created getter & setter for encryptionSeparator

This commit is contained in:
Václav Šmejkal 2022-06-18 18:28:33 +02:00
parent cabd16a63f
commit 1a5b58edf9
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19
2 changed files with 12 additions and 0 deletions

View File

@ -47,11 +47,13 @@ static char encryptionSeparator = '.'; // > DO NOT TOUCH THIS, USE setEncryp
static unsigned long keyLength = 50; //LENGTH OF KEY > DO NOT TOUCH THIS, USE setKeyLength instead < static unsigned long keyLength = 50; //LENGTH OF KEY > DO NOT TOUCH THIS, USE setKeyLength instead <
//GETTERS //GETTERS
char getEncryptionSeparator();
unsigned long getKeyLength(); unsigned long getKeyLength();
inputFlags noFlags(); //THIS GENERATES inputFlags WITH DEFAULT VALUES inputFlags noFlags(); //THIS GENERATES inputFlags WITH DEFAULT VALUES
outputFlags noOutput(unsigned char exitCode); //SAME AS noFlags() BUT FOR outputFlags outputFlags noOutput(unsigned char exitCode); //SAME AS noFlags() BUT FOR outputFlags
//SETTERS //SETTERS
void setEncryptionSeparator(char encryptionSeparatorNew);
void setKeyLength(int keyLengthNew); void setKeyLength(int keyLengthNew);
#endif #endif

View File

@ -2,6 +2,11 @@
#include <stdlib.h> #include <stdlib.h>
char getEncryptionSeparator()
{
return encryptionSeparator;
}
unsigned long getKeyLength() unsigned long getKeyLength()
{ {
return keyLength; return keyLength;
@ -22,6 +27,11 @@ outputFlags noOutput(unsigned char exitCode)
return (outputFlags) { empty1, empty2, 0, 0, exitCode }; return (outputFlags) { empty1, empty2, 0, 0, exitCode };
} }
void setEncryptionSeparator(char encryptionSeparatorNew)
{
encryptionSeparator = encryptionSeparatorNew;
}
void setKeyLength(int keyLengthNew) void setKeyLength(int keyLengthNew)
{ {
keyLength = keyLengthNew; keyLength = keyLengthNew;