diff --git a/src/lib/decrypter.c b/src/lib/decrypter.c index af766aa..685f8be 100644 --- a/src/lib/decrypter.c +++ b/src/lib/decrypter.c @@ -12,7 +12,7 @@ outputFlags decryptText(char *text, char *key, inputFlags flags) //CHECK FOR INVALID key if (strlen(key) < getKeyLength()) { - fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength()); + if (!flags.noOutput) fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength()); exit(INVALID_KEY); } diff --git a/src/lib/encrypter.c b/src/lib/encrypter.c index 1ad1be3..c29f1c2 100644 --- a/src/lib/encrypter.c +++ b/src/lib/encrypter.c @@ -27,7 +27,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags) { if (strlen(keyNew) < getKeyLength()) { - fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength()); + if (!flags.noOutput) fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength()); exit(INVALID_KEY); }