Skip to content

Instantly share code, notes, and snippets.

@sangfansh
Created August 11, 2018 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sangfansh/496ed4da9dafe89ef340fa714f37bdd6 to your computer and use it in GitHub Desktop.
Save sangfansh/496ed4da9dafe89ef340fa714f37bdd6 to your computer and use it in GitHub Desktop.
#define MAX_ITEMS 100
#define MAX_ITEM_SIZE 100
// item
struct Item {
char title[MAX_ITEM_SIZE];
char username[MAX_ITEM_SIZE];
char password[MAX_ITEM_SIZE];
};
typedef struct Item item_t;
// wallet
struct Wallet {
item_t items[MAX_ITEMS];
size_t size;
char master_password[MAX_ITEM_SIZE];
};
typedef struct Wallet wallet_t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment