crypto.h 431 B

12345678910
  1. #ifndef CRYPTO_H
  2. #define CRYPTO_H
  3. #include <stdio.h>
  4. #include <string>
  5. uint32_t generate_rsa_keypair(FILE* fp, std::string& priv_key_str, std::string& pub_key_str); //, uint8_t* hash);
  6. uint32_t generate_rsa_keypair_hash(uint8_t* hash);
  7. int aes_gcm_128(int enc, unsigned char *key, unsigned char *iv, unsigned char* plaintext, int plaintext_len, unsigned char *ciphertext, uint32_t* op_ciphertext_len, unsigned char* tag);
  8. #endif