diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-03-11 17:11:48 +0400 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-03-11 17:11:48 +0400 |
| commit | ecda75a273c653eeb42bd0449831a250433e05f0 (patch) | |
| tree | 66b6ccb19e2b34709e2b81ebc6109fc0ff665b07 /CryptClass/AESCrypt.cpp | |
| parent | 5783bf5e104813c3e62c134fb6a0d2c619a31635 (diff) | |
Arrange code
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){ |
