diff options
Diffstat (limited to 'CryptClass/AESCrypt.cpp')
| -rw-r--r-- | CryptClass/AESCrypt.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/CryptClass/AESCrypt.cpp b/CryptClass/AESCrypt.cpp index 0add260..5a1e3eb 100644 --- a/CryptClass/AESCrypt.cpp +++ b/CryptClass/AESCrypt.cpp @@ -26,7 +26,7 @@ AESCrypt::~AESCrypt(){ -//Encrypt string +//Encrypt string with string key std::string AESCrypt::encrypt(std::string key, std::string data){ //Generate SHA-256 @@ -36,14 +36,13 @@ std::string AESCrypt::encrypt(std::string key, std::string data){ return encryptRoutine(data, digest, sizeof(digest)); } -//Encrypt string -std::string AESCrypt::encrypt(byte* key, std::string data){ +//Encrypt string with byte* key +std::string AESCrypt::encrypt(byte* key, std::string data){ return encryptRoutine(data, key, 32); - } - +//The encryptRoutine std::string AESCrypt::encryptRoutine(std::string data, byte* digest, int size){ //Contain data encrypted std::string cipher; @@ -79,14 +78,6 @@ std::string AESCrypt::encryptRoutine(std::string data, byte* digest, int size){ - - - - - - - - //Decrypt string std::string AESCrypt::decrypt(std::string key, std::string data){ |
