Nikola Petrov 8b60cdc81b change add_logininfo_to_buffer
to accept size of data for future use
2024-07-21 23:43:52 +02:00

39 lines
777 B
C++

#ifndef FUNC_HPP
#define FUNC_HPP
#include <string>
class Buffer;
struct LoginInfo
{
uint32_t label;
uint32_t username;
uint32_t password;
};
struct LoginInfoPointer
{
const char *label;
const char *username;
const char *password;
};
struct Index
{
uint32_t magic;
uint32_t count;
uint32_t offset;
};
int find_logininfo_in_buffer(Buffer &buffer, const char *label);
void delete_logininfo_from_buffer(Buffer &buffer, int index_of_pass);
void add_logininfo_to_buffer(Buffer &buffer, const char *label, size_t label_size, const char *username, size_t username_size, const char *password, size_t password_size);
LoginInfoPointer get_logininfo_pointer_from_buffer(Buffer &buffer, int index_of_pass);
bool generate_password(std::string &password, int len);
#endif