update// added some stuff

This commit is contained in:
Strider
2020-05-23 15:23:07 +02:00
parent 1599f3631c
commit a72ba09ee3
8 changed files with 106 additions and 20 deletions

View File

@@ -3,11 +3,17 @@
#include <stdio.h>
#include <sodium.h>
#include <QString>
#include <fstream>
#define FILEENCRYPTION_CHUNK_SIZE 4096
class FileEncryption
{
private:
inline static bool exists (const std::string& name) {
std::ifstream f(name.c_str());
return f.good();
}
public:
static void showConfig();
static int encrypt(QString target_file, QString source_file, const unsigned char key[crypto_secretstream_xchacha20poly1305_KEYBYTES]);