change to header files and update of function calls in src folder

This commit is contained in:
Jacob Barthelmeh
2015-01-01 14:48:33 -07:00
parent 5365bdb06c
commit b91934f065
13 changed files with 310 additions and 162 deletions

View File

@@ -306,9 +306,9 @@ static int Hash_gen(DRBG* drbg, byte* out, word32 outSz, const byte* V)
XMEMCPY(data, V, sizeof(data));
for (i = 0; i < len; i++) {
if (InitSha256(&drbg->sha) != 0 ||
Sha256Update(&drbg->sha, data, sizeof(data)) != 0 ||
Sha256Final(&drbg->sha, drbg->digest) != 0) {
if (wc_InitSha256(&drbg->sha) != 0 ||
wc_Sha256Update(&drbg->sha, data, sizeof(data)) != 0 ||
wc_Sha256Final(&drbg->sha, drbg->digest) != 0) {
return DRBG_FAILURE;
}
@@ -381,10 +381,10 @@ static int Hash_DRBG_Generate(DRBG* drbg, byte* out, word32 outSz)
ret = Hash_gen(drbg, out, outSz, drbg->V);
if (ret == DRBG_SUCCESS) {
if (InitSha256(&drbg->sha) != 0 ||
Sha256Update(&drbg->sha, &type, sizeof(type)) != 0 ||
Sha256Update(&drbg->sha, drbg->V, sizeof(drbg->V)) != 0 ||
Sha256Final(&drbg->sha, drbg->digest) != 0) {
if (wc_InitSha256(&drbg->sha) != 0 ||
wc_Sha256Update(&drbg->sha, &type, sizeof(type)) != 0 ||
wc_Sha256Update(&drbg->sha, drbg->V, sizeof(drbg->V)) != 0 ||
wc_Sha256Final(&drbg->sha, drbg->digest) != 0) {
ret = DRBG_FAILURE;
}