remove cryptography class and use aes256 class
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
struct LoginInfoPointer;
|
||||
class Buffer;
|
||||
class Cryptography;
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
@@ -28,23 +27,23 @@ Arg get_args(int argc, char **argv, char **label);
|
||||
|
||||
std::optional<LoginInfoPointer> arg_get(Buffer &decrypted_buffer, const char *label);
|
||||
|
||||
std::optional<LoginInfoPointer> arg_new_password(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, Cryptography &crypto, bool generate);
|
||||
std::optional<LoginInfoPointer> arg_new_password(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key, bool generate);
|
||||
|
||||
void arg_username(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, Cryptography &crypto);
|
||||
void arg_username(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
||||
|
||||
void arg_label_name(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, Cryptography &crypto);
|
||||
void arg_label_name(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
||||
|
||||
void arg_list(Buffer &decrypted_buffer);
|
||||
|
||||
void arg_delete(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, Cryptography &crypto);
|
||||
void arg_delete(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
||||
|
||||
void arg_print_all_p(Buffer &decrypted_buffer, std::string &user_pass);
|
||||
|
||||
void arg_change(Buffer &decrypted_buffer, Buffer &encrypted_buffer, std::string &user_pass, Cryptography &crypto);
|
||||
void arg_change(Buffer &decrypted_buffer, Buffer &encrypted_buffer, std::string &user_pass);
|
||||
|
||||
void arg_show(Buffer &decrypted_buffer, const char *label);
|
||||
|
||||
void arg_file(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, Cryptography &crypto, std::string &save_location_path);
|
||||
void arg_file(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key, std::string &save_location_path);
|
||||
|
||||
void arg_size(Buffer &encrypted_buffer);
|
||||
|
||||
|
@@ -1,21 +0,0 @@
|
||||
#ifndef CRYPTOGRAPHY_HPP
|
||||
#define CRYPTOGRAPHY_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class Buffer;
|
||||
|
||||
class Cryptography
|
||||
{
|
||||
public:
|
||||
Cryptography(std::string password);
|
||||
~Cryptography();
|
||||
void change_pass(std::string password);
|
||||
bool encrypt(Buffer &plain, Buffer &encrypted);
|
||||
bool decrypt(Buffer &encrypted, Buffer &decrypted);
|
||||
|
||||
private:
|
||||
std::string key;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user