aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index f818c48..2cd31ec 100644
--- a/main.cpp
+++ b/main.cpp
@@ -6,6 +6,7 @@
#include <cctype>
#include <ctime>
#include <cassert>
+#include "aes.h"
#include "base64.h"
#include "bigint.h"
#include "numalgo.h"
@@ -211,12 +212,16 @@ int main(int argc,char **argv){
fwrite(data,1,4,stdout);
}*/
- string s;
+ /*string s;
while(true){
char c=cin.get();
if(!cin)break;
s.push_back(c);
}
cout<<Base64::encode(s)<<endl;
- // cout<<Base64::decode(s)<<flush;
+ // cout<<Base64::decode(s)<<flush;*/
+
+ // AES::test();
+ cout<<Base64::encode(AES::encrypt("123456789abcdefx","goeiemorgen dit is leuke data enzoo",AES::AES_128_CBC))<<endl;
+ cout<<AES::decrypt("123456789abcdefx",Base64::decode("dv2N3n2FHsD7LU2PAZnZm/bLQQSaaZoDDFjy3VrSu2JCHN5KuyBlinlh9C71IGTbT4/WvRKLp6dp1TfrKXIG2w=="),AES::AES_128_CBC)<<endl;
}