
  #include "crypto.hpp"
  #include <string>
  #include "encrypt.h"

  using namespace std;

  Crypto::Crypto() {

  }


  std::string Crypto::getJniJsonStringyfyData(string key) {
    std::string jsonStringyfyData= "{\"secure1\":\"secure1 value\",\"secure2\":\"secure2 value\",\"secure3\":\"secure3 value\"}";
      string hash;
      int len=jsonStringyfyData.length();
      char cahrtot[len+1];
      strcpy(cahrtot,jsonStringyfyData.c_str());
      hash=SHA256(cahrtot);
      string halfString=hash.substr(hash.length()/2);
      if(key==halfString)
      {
        return jsonStringyfyData;
      }
      else
      {
          return "";
      }
    
  }
  