From 8edf216545dc050c815324d7c58ad0e5d37e997b Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 23 Apr 2022 18:47:03 +0200 Subject: [PATCH] made invalid_key message more variable --- src/decrypter.c | 2 +- src/encrypter.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/decrypter.c b/src/decrypter.c index 6bf9218..1ed2cc8 100644 --- a/src/decrypter.c +++ b/src/decrypter.c @@ -12,7 +12,7 @@ decryptText(char *text, char *key) //CHECK FOR INVALID key if (strlen(key) < KEY_LENGTH) { - fprintf(stderr, "Key must be at least 50 characters long!\n"); + fprintf(stderr, "Key must be at least %d characters long!\n", KEY_LENGTH); exit(INVALID_KEY); } diff --git a/src/encrypter.c b/src/encrypter.c index da24d7f..e84e9f3 100644 --- a/src/encrypter.c +++ b/src/encrypter.c @@ -28,7 +28,7 @@ encryptText(char *text, char *keyNew) { if (strlen(keyNew) < KEY_LENGTH) { - fprintf(stderr, "Key must be at least 50 characters long!\n"); + fprintf(stderr, "Key must be at least %d characters long!\n", KEY_LENGTH); exit(INVALID_KEY); }