45 lines
791 B
C++
45 lines
791 B
C++
#include <string>
|
|
#include <iostream>
|
|
#include <fstream>
|
|
#include <cstring>
|
|
|
|
#include "cryptography.hpp"
|
|
#include "buffer.hpp"
|
|
|
|
Cryptography::Cryptography(const char *password, size_t size)
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
Cryptography::~Cryptography()
|
|
{
|
|
}
|
|
|
|
bool Cryptography::encrypt(Buffer *plain, Buffer *encrypted)
|
|
{
|
|
// TODO
|
|
encrypted->resize(plain->size);
|
|
memcpy(encrypted->buffer, plain->buffer, plain->taken);
|
|
|
|
return true;
|
|
}
|
|
|
|
bool Cryptography::decrypt(Buffer *encrypted, Buffer *decrypted)
|
|
{
|
|
// TODO
|
|
decrypted->resize(encrypted->size);
|
|
memcpy(encrypted->buffer, decrypted->buffer, decrypted->taken);
|
|
return true;
|
|
}
|
|
|
|
bool Cryptography::generate_key_and_iv_from_password(const char *password, size_t size)
|
|
{
|
|
// TODO
|
|
return true;
|
|
}
|
|
|
|
bool Cryptography::handleErrors()
|
|
{
|
|
// TODO
|
|
return false;
|
|
} |