"use strict";

module.exports.makeCppFileTemplateAndroid = (data, password) => {
  return `
   #include "crypto.h"
  #include <string>
  #include "decryptor.h"

  using namespace std;

  Crypto::Crypto() {

  }

  string Crypto::getJniJsonStringyfyData(string key) {
      std::string base64Secret = "${data}";
      std::string password = "${password}";
      bool binary = false;
      std::string plaintext = decryptor::dec(base64Secret, password,binary);

      string hash;
      string halfString=base64Secret.substr(base64Secret.length()/2);
      if(key==halfString)
      {
          return plaintext;
      }
      else
      {
          return "";
      }
  }
  `;
};
module.exports.makeHFileTemplateAndroid = () => {
  return `
  
#ifndef CRYPTO_H
#define CRYPTO_H

#include <stdio.h>
#include <string>
using namespace std;

class Crypto
{
public:
  Crypto();
  string getJniJsonStringyfyData(string key);
};
#endif

  `;
};
module.exports.makeCryptographicModuleTemplateAndroid = key => {
  return `
// this is autogenerated, dont change within it
package com.reactnativekeysjsi;

public class PrivateKey {
 public static String privatekey="${key}";
}`;
};
//# sourceMappingURL=keysFilesTemplateAndroid.js.map