Renamed class GCryptWrapper to GWrapper

This commit is contained in:
Leonetienne
2022-05-22 13:07:40 +02:00
parent cf784ca8ac
commit bb76cbb2d7
3 changed files with 13 additions and 14 deletions

View File

@@ -1,10 +1,10 @@
#include "GCrypt/GCryptWrapper.h"
#include "GCrypt/GWrapper.h"
#include "GCrypt/GCipher.h"
#include "GCrypt/Util.h"
namespace Leonetienne::GCrypt {
std::string GCryptWrapper::EncryptString(const std::string& cleartext, const std::string& password) {
std::string GWrapper::EncryptString(const std::string& cleartext, const std::string& password) {
// Transform the password to a key
const Block key = PasswordToKey(password);
@@ -21,7 +21,7 @@ namespace Leonetienne::GCrypt {
return ciphertext;
}
std::string GCryptWrapper::DecryptString(const std::string& ciphertext, const std::string& password) {
std::string GWrapper::DecryptString(const std::string& ciphertext, const std::string& password) {
// Transform the password to a key
const Block key = PasswordToKey(password);
@@ -38,7 +38,7 @@ namespace Leonetienne::GCrypt {
return cleartext;
}
bool GCryptWrapper::EncryptFile(const std::string& filename_in, const std::string& filename_out, const std::string& password, bool printProgressReport) {
bool GWrapper::EncryptFile(const std::string& filename_in, const std::string& filename_out, const std::string& password, bool printProgressReport) {
try {
// Read the file to bits
const Flexblock cleartext_bits = ReadFileToBits(filename_in);
@@ -59,7 +59,7 @@ namespace Leonetienne::GCrypt {
}
}
bool GCryptWrapper::DecryptFile(const std::string& filename_in, const std::string& filename_out, const std::string& password, bool printProgressReport) {
bool GWrapper::DecryptFile(const std::string& filename_in, const std::string& filename_out, const std::string& password, bool printProgressReport) {
try {
// Read the file to bits
const Flexblock ciphertext_bits = ReadFileToBits(filename_in);
@@ -80,7 +80,7 @@ namespace Leonetienne::GCrypt {
}
}
Flexblock GCryptWrapper::CipherFlexblock(
Flexblock GWrapper::CipherFlexblock(
const Flexblock& data,
const Block& key,
const GCipher::DIRECTION direction)