crypto.h 572 B

123456789101112
  1. //uint32_t generate_rsa_key(std::string& priv_key_str, std::string& pub_key_str);
  2. //class RSA_signing_keypair
  3. //{
  4. // private:
  5. // RSA_ptr rsa;
  6. // BN_ptr bn;
  7. // public:
  8. // RSA_signing_keypair();
  9. uint32_t generate_rsa_keypair(FILE* fp, std::string& priv_key_str, std::string& pub_key_str); //, uint8_t* hash);
  10. uint32_t generate_rsa_keypair_hash(uint8_t* hash);
  11. //}
  12. int aes_cipher(int enc, unsigned char *key, unsigned char *iv, unsigned char* plaintext, int plaintext_len, unsigned char *ciphertext, int* op_ciphertext_len, unsigned char* tag);