From 5767e9757caf554ed9fe5a597d19e37b917c1df5 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Mon, 28 Aug 2023 12:23:02 +0200 Subject: [PATCH] Add update username --- Password_manager/include/arg_func.h | 5 ++++- Password_manager/source/arg_func.cpp | 25 +++++++++++++++++++++++++ Password_manager/source/main.cpp | 12 ++++++++++-- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Password_manager/include/arg_func.h b/Password_manager/include/arg_func.h index d671697..cd4d979 100644 --- a/Password_manager/include/arg_func.h +++ b/Password_manager/include/arg_func.h @@ -16,7 +16,8 @@ enum class Arg Input, // input password for label Change, // change main password Show, // show password for label - Error // error + Error, // error + Username, // update username }; Arg get_args(int argc, char** argv, char** label); @@ -27,6 +28,8 @@ LoginInfoPointer arg_generate(Buffer& decrypted_buffer, Buffer& encrypted_buffer std::optional arg_input(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto); +void arg_username(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto); + void arg_list(Buffer& decrypted_buffer); void arg_delete(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto); diff --git a/Password_manager/source/arg_func.cpp b/Password_manager/source/arg_func.cpp index fee11a6..aecdf14 100644 --- a/Password_manager/source/arg_func.cpp +++ b/Password_manager/source/arg_func.cpp @@ -20,6 +20,7 @@ void print_args() printf_s(" -i