From 80dd838ca8924397d47902541a7fc1148dd0e52a Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 9 Dec 2022 17:55:21 +0100 Subject: [PATCH] unfucked generating random seed --- src/core/lib/encrypter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/encrypter.c b/src/core/lib/encrypter.c index 6486f9e..934f546 100644 --- a/src/core/lib/encrypter.c +++ b/src/core/lib/encrypter.c @@ -59,8 +59,8 @@ outputFlags encryptText(char *text, char *keyNew) //TRY TO MAKE RANDOM GENERATION REALLY "RANDOM" fileBuffer = fopen("/dev/urandom", "r"); (void) (fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value - srand(numberBuffer); numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE + srand(numberBuffer); if (keyNew != NULL) {