-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprojectCurrentHeader.h
More file actions
70 lines (60 loc) · 2.06 KB
/
projectCurrentHeader.h
File metadata and controls
70 lines (60 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef PROJECT_HEADER_OMEGA_H
/*********Structures********************/
/*Node Structure in Order to implment a linkedlist*/
struct account {
char accountID[10];
double accountValue;
int availableFlag;
};
typedef struct account account_t;
struct user {
char username[10];
char password_1[10];
char userID[6];
/*made 6 for \0*/
account_t account[6];
int numAccounts;
/*added, useful when writing to file*/
int suFlag;
/*Checks if user has su i.e(admin) rights
to add or modify details*/
};
typedef struct user user_t;
struct node {
struct node* nextp;
user_t user;
};
typedef struct node* node_t;
/* The First value a pointer*/
struct map {
int key;
int value;
};
typedef struct map map_t;
/****************************************/
/**************Prototypes*************************/
node_t login(node_t linkList, node_t p, int debugFlag, int *compressFlag, int *encryptFlag);
char accountMenu();
int addNewAccount(node_t linkList, node_t p, int debugFlag);
void TransferMoney(node_t p, node_t linkList, int debugFlag);
void withdrawMoney(node_t p, node_t linkList, int debugFlag);
int depositMoney(node_t p, node_t linkList, int debugFlag);
node_t newNode(node_t linkList, node_t p);
node_t newUser(node_t linkList, int *numUsers, node_t p, int debugFlag, int *encryptFlag);
int writeFile(node_t p, int* numUsers);
node_t userMenu(node_t linkList, node_t p, int *debugFlag, int *numUsers, int *compressFlag, int *encryptFlag);
void listAccounts(node_t p);
void insert_hashmap(int *employeeId, map_t hashmap[], int * new_key);
void display_hashmap(int *employeeId, map_t hashmap[], int * new_key);
int writeFileV3(node_t linkList, int* numUsers, int *encryptFlag);
int readFile(node_t linkList, node_t p, int* numUsers, int* encryptFlag);
char * encrypt(char * encryptMessage, char * key);
char * decrypt(char * decryptMessage);
char *encoding(char str[]);
char *decoding(char str[]);
void doEncryption();
void doDecryption();
void doCompress();
void doDecompress();
/***************************************************/
#endif