made reading /dev/urandom in encrypter little bit more variable
This commit is contained in:
parent
79617cb3b4
commit
e70b54da69
@ -40,7 +40,7 @@ outputFlags encryptText(char *text, char *keyNew)
|
|||||||
|
|
||||||
//TRY TO MAKE RANDOM GENERATION REALLY "RANDOM"
|
//TRY TO MAKE RANDOM GENERATION REALLY "RANDOM"
|
||||||
fileBuffer = fopen("/dev/urandom", "r");
|
fileBuffer = fopen("/dev/urandom", "r");
|
||||||
fread(&numberBuffer, 4, 1, fileBuffer);
|
fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer);
|
||||||
srand(numberBuffer);
|
srand(numberBuffer);
|
||||||
numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE
|
numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user