2023-08-14 14:14:44 +02:00

35 lines
628 B
C

#pragma once
#include <fstream>
#include "buffer.h"
struct Pass
{
char label[21];
char password[21];
Pass() = default;
};
enum class Args
{
Get, // get password for label
Generate, // generate password for label
List, // list all labels
Delete, // delete password for label
Print_all_p, // print all passwords
Input, // input password for label
Error // error
};
Pass* find_password(Buffer* buff, char* label);
void generate_password(char* password);
bool save_buffer_to_file(Buffer* buffer);
bool load_buffer_from_file(Buffer* buffer);
void print_usage();
Args get_args(int argc, char** argv, char** label);