X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fcrypto%2Frsa_crypto.h;h=b2419309fe2ccb12dce9eb2cbd12a44219e0a763;hb=d60e7a2467ab8be80a06ba670ccba1819ca7c0e4;hp=e43f1bdb7e5632f0762ab1a8864afd3136f68077;hpb=3ea085ec301ed1399dfa1e9f3a240312dc95410b;p=feisty_meow.git diff --git a/nucleus/library/crypto/rsa_crypto.h b/nucleus/library/crypto/rsa_crypto.h index e43f1bdb..b2419309 100644 --- a/nucleus/library/crypto/rsa_crypto.h +++ b/nucleus/library/crypto/rsa_crypto.h @@ -19,7 +19,8 @@ #include // forward. -struct rsa_st; +//struct RSA; +typedef struct rsa_st RSA; namespace crypto { @@ -43,7 +44,7 @@ public: is a public key, then only the public_encryption and public_decryption methods will be available. */ - rsa_crypto(rsa_st *key); + rsa_crypto(RSA *key); //!< starts with a pre-existing "key" in the low-level form. rsa_crypto(const rsa_crypto &to_copy); @@ -60,11 +61,11 @@ public: is destructively consumed during the set method; do not pass in your only copy. */ - bool set_key(rsa_st *key); + bool set_key(RSA *key); //!< sets our new "key". /*!< this must be a valid key created via the RSA algorithms. */ - bool check_key(rsa_st *key); + bool check_key(RSA *key); //!< checks the RSA "key" provided for validity. bool public_encrypt(const basis::byte_array &source, basis::byte_array &target) const; @@ -89,11 +90,11 @@ public: //!< makes a copy of the private key held here. /*!< the private key should never be exposed to anyone else. */ - static rsa_st *generate_key(int key_size); + static RSA *generate_key(int key_size); //!< creates a random RSA key using the lower-level openssl methods. private: - rsa_st *_key; //!< our internal key. + RSA *_key; //!< our internal key. }; } //namespace.