diff --git a/src/decrypter.c b/src/decrypter.c index 68998b5..6bf9218 100644 --- a/src/decrypter.c +++ b/src/decrypter.c @@ -10,9 +10,9 @@ char* decryptText(char *text, char *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); } diff --git a/src/encrypter.c b/src/encrypter.c index a7ff5f2..a675347 100644 --- a/src/encrypter.c +++ b/src/encrypter.c @@ -71,9 +71,9 @@ encryptText(char *text, char *keyNew) 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); }