Files
Krypto/src/Main.cpp

30 lines
708 B
C++
Raw Normal View History

2021-02-18 22:09:51 +05:30
/**
* /mnt/z/my_git/RCRS-CSD-327/src/Main.cpp
* @file Main.cpp
* @author Avinal Kumar
* @since February 18, 2021
*
* The driver code
*/
#include "Encryptor.h"
2021-03-25 23:08:35 +05:30
#include "Utils.h"
2021-02-18 22:09:51 +05:30
int main(int argc, char const *argv[]) {
2021-03-25 23:08:35 +05:30
krypto::fileop test;
std::vector<char> buffer;
std::string filename, password;
std::cin >> filename >> password;
2021-03-05 01:49:06 +05:30
krypto::filestat stat(filename);
test.read_file(filename, buffer, stat);
test.pad_input(buffer, stat.filesize);
krypto::Encryptor encryptor;
// encryptor.blowfish_encrypt(buffer, password, stat.filesize);
encryptor.blowfish_decrypt(buffer,password,stat.filesize);
test.write_file(filename.substr(8) , buffer, stat.filesize);
2021-02-18 22:09:51 +05:30
return 0;
}