made big keys possible

This commit is contained in:
Václav Šmejkal 2022-04-09 17:53:51 +02:00
parent 2c6960884e
commit a1141703e5
2 changed files with 4 additions and 4 deletions

View File

@ -10,9 +10,9 @@ char*
decryptText(char *text, char *key) decryptText(char *text, char *key)
{ {
//CHECK FOR INVALID key //CHECK FOR INVALID key
if (strlen(key) != KEY_LENGTH) if (strlen(key) < KEY_LENGTH)
{ {
fprintf(stderr, "Key must be 50 characters long!\n"); fprintf(stderr, "Key must be at least 50 characters long!\n");
exit(INVALID_KEY); exit(INVALID_KEY);
} }

View File

@ -71,9 +71,9 @@ encryptText(char *text, char *keyNew)
if (keyNew != NULL) if (keyNew != NULL)
{ {
if (strlen(keyNew) != KEY_LENGTH) if (strlen(keyNew) < KEY_LENGTH)
{ {
fprintf(stderr, "Key must be 50 characters long!\n"); fprintf(stderr, "Key must be at least 50 characters long!\n");
exit(INVALID_KEY); exit(INVALID_KEY);
} }