fix arg_change
This commit is contained in:
@@ -287,7 +287,7 @@ void arg_change(Buffer &decrypted_buffer, Buffer &encrypted_buffer, std::string
|
||||
return;
|
||||
}
|
||||
|
||||
crypto.generate_key_and_iv_from_password(new_string.c_str(), new_string.size());
|
||||
crypto.change_pass(new_string);
|
||||
crypto.encrypt(&decrypted_buffer, &encrypted_buffer);
|
||||
encrypted_buffer.save_to_file();
|
||||
printf("Password changed\n");
|
||||
|
@@ -16,6 +16,11 @@ Cryptography::~Cryptography()
|
||||
{
|
||||
}
|
||||
|
||||
void Cryptography::change_pass(std::string password)
|
||||
{
|
||||
key = password;
|
||||
}
|
||||
|
||||
bool Cryptography::encrypt(Buffer *plain, Buffer *encrypted)
|
||||
{
|
||||
ByteArray in(plain->buffer, plain->buffer + plain->taken);
|
||||
|
Reference in New Issue
Block a user