SHA256, SHA384 and SHA512 error propagation. Major impact on random functions with error propagation.

This commit is contained in:
Moisés Guimarães
2014-04-14 16:28:43 -03:00
parent 32e2d7016f
commit 8d8fca67c3
14 changed files with 259 additions and 128 deletions

View File

@@ -301,9 +301,7 @@ int CRYPT_RNG_Get(CRYPT_RNG_CTX* rng, unsigned char* b)
if (rng == NULL || b == NULL)
return BAD_FUNC_ARG;
*b = RNG_GenerateByte((RNG*)rng);
return 0;
return RNG_GenerateByte((RNG*)rng, (byte*)b);
}
@@ -314,9 +312,7 @@ int CRYPT_RNG_BlockGenerate(CRYPT_RNG_CTX* rng, unsigned char* b,
if (rng == NULL || b == NULL)
return BAD_FUNC_ARG;
RNG_GenerateBlock((RNG*)rng, b, sz);
return 0;
return RNG_GenerateBlock((RNG*)rng, b, sz);
}