Made the whole thing MUCH more secure, by adding an IV (initialization vector), implemeted RRKM (rolling round key mode) and redone key extrapolation
This commit is contained in:
@@ -12,13 +12,13 @@ void ExampleString()
|
||||
std::cout << "Example on how to encrypt & decrypt a string:" << std::endl;
|
||||
|
||||
// Get some string
|
||||
const std::string input = "I am a super secret message!";
|
||||
const std::string input = "I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!I am a super secret message!";
|
||||
std::cout << input << std::endl;
|
||||
|
||||
// Encrypt
|
||||
const std::string encrypted = GhettoCryptWrapper::EncryptString(input, "password1");
|
||||
std::cout << encrypted << std::endl;
|
||||
|
||||
|
||||
// Decrypt
|
||||
const std::string decrypted = GhettoCryptWrapper::DecryptString(encrypted, "password1");
|
||||
std::cout << decrypted << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user