2021-12-06 02:58:35 +01:00
# pragma once
# include <iostream>
2021-12-06 03:30:02 +01:00
# include <GhettoCryptWrapper.h>
2021-12-13 14:40:29 +01:00
# include <SecureBitset.h>
2022-02-06 18:38:09 +01:00
# include <Util.h>
# include <InitializationVector.h>
2021-12-06 02:58:35 +01:00
using namespace GhettoCipher ;
void ExampleString ( )
{
std : : cout < < " Example on how to encrypt & decrypt a string: " < < std : : endl ;
// Get some string
2022-02-06 21:54:43 +01:00
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! " ;
2021-12-06 02:58:35 +01:00
std : : cout < < input < < std : : endl ;
// Encrypt
const std : : string encrypted = GhettoCryptWrapper : : EncryptString ( input , " password1 " ) ;
std : : cout < < encrypted < < std : : endl ;
2022-02-06 21:54:43 +01:00
2021-12-06 02:58:35 +01:00
// Decrypt
const std : : string decrypted = GhettoCryptWrapper : : DecryptString ( encrypted , " password1 " ) ;
std : : cout < < decrypted < < std : : endl ;
return ;
}
void ExampleFiles ( )
{
std : : cout < < " Example on how to encrypt & decrypt any file: " < < std : : endl ;
// Encrypt
GhettoCryptWrapper : : EncryptFile ( " main.cpp " , " main.cpp.crypt " , " password1 " ) ;
// Decrypt
GhettoCryptWrapper : : DecryptFile ( " main.cpp.crypt " , " main.cpp.clear " , " password1 " ) ;
return ;
}
int main ( )
{
2022-02-06 18:46:07 +01:00
ExampleString ( ) ;
2021-12-06 13:13:49 +01:00
//ExampleFiles();
2021-12-06 02:58:35 +01:00
return 0 ;
}