Rename in, out buffer
This commit is contained in:
		| @@ -115,20 +115,20 @@ void arg_list(Buffer& decrypted_buffer) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| void arg_delete(Buffer& in_buffer, Buffer& out_buffer, const char* label_to_del, Cryptography& crypto) | void arg_delete(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label_to_del, Cryptography& crypto) | ||||||
| { | { | ||||||
| 	printf_s("Deleting password for %s\n", label_to_del); | 	printf_s("Deleting password for %s\n", label_to_del); | ||||||
| 	int pass = find_logininfo_in_buffer(in_buffer, label_to_del); | 	int pass = find_logininfo_in_buffer(decrypted_buffer, label_to_del); | ||||||
| 	if (pass < 0) | 	if (pass < 0) | ||||||
| 	{ | 	{ | ||||||
| 		printf_s("Password not found\n"); | 		printf_s("Password not found\n"); | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	delete_logininfo_from_buffer(in_buffer, pass); | 	delete_logininfo_from_buffer(decrypted_buffer, pass); | ||||||
|  |  | ||||||
| 	crypto.encrypt(&in_buffer, &out_buffer); | 	crypto.encrypt(&decrypted_buffer, &encrypted_buffer); | ||||||
| 	out_buffer.save_to_file(); | 	encrypted_buffer.save_to_file(); | ||||||
| 	printf_s("Password deleted\n"); | 	printf_s("Password deleted\n"); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -157,8 +157,6 @@ 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, Cryptography& crypto) | ||||||
| { | { | ||||||
| 	printf_s("Input main password for confirmation:"); | 	printf_s("Input main password for confirmation:"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nikola Petrov
					Nikola Petrov