created getter & setter for keyLength (replacement for KEY_LENGTH)

This commit is contained in:
Václav Šmejkal 2022-05-03 18:36:44 +02:00
parent d194526fc8
commit e85a14b253
2 changed files with 14 additions and 1 deletions

View File

@ -2,7 +2,6 @@
#define WHY2_FLAGS_H #define WHY2_FLAGS_H
//CONSTS //CONSTS
#define KEY_LENGTH 50
#define ENCRYPTION_SEPARATOR '.' #define ENCRYPTION_SEPARATOR '.'
#define ENCRYPTION_SEPARATOR_STRING "." #define ENCRYPTION_SEPARATOR_STRING "."
@ -13,10 +12,14 @@
#define VERSIONS_NAME "versions.json" #define VERSIONS_NAME "versions.json"
//VARIABLES //VARIABLES
static int keyLength = 50;
static int skipCheck = 0; static int skipCheck = 0;
//FUNCTIONS //FUNCTIONS
int getSkipCheck(); int getSkipCheck();
void setSkipCheck(int skipCheckNew); void setSkipCheck(int skipCheckNew);
int getKeyLength();
void setKeyLength(int keyLengthNew);
#endif #endif

View File

@ -9,3 +9,13 @@ void setSkipCheck(int skipCheckNew)
{ {
skipCheck = skipCheckNew; skipCheck = skipCheckNew;
} }
int getKeyLength()
{
return keyLength;
}
void setKeyLength(int keyLengthNew)
{
keyLength = keyLengthNew;
}