StatefulMem* functions should be library functions.

We want the BIOS to implement the stub functions, but that shouldn't include
our StatefulMem* functions.

Also, we ensure that we don't accidently use native linux functions instead
of the stub functions.

Review URL: http://codereview.chromium.org/2255006
This commit is contained in:
Bill Richardson
2010-05-27 12:27:32 -07:00
parent f5db4b86fa
commit d6ff721eb0
10 changed files with 126 additions and 84 deletions

View File

@@ -378,7 +378,7 @@ uint8_t* SHA256_final(SHA256_CTX* ctx) {
len_b = (ctx->tot_len + ctx->len) << 3;
pm_len = block_nb << 6;
memset(ctx->block + ctx->len, 0, pm_len - ctx->len);
Memset(ctx->block + ctx->len, 0, pm_len - ctx->len);
ctx->block[ctx->len] = 0x80;
UNPACK32(len_b, ctx->block + pm_len - 4);
@@ -568,7 +568,7 @@ uint8_t* SHA512_final(SHA512_CTX* ctx)
len_b = (ctx->tot_len + ctx->len) << 3;
pm_len = block_nb << 7;
memset(ctx->block + ctx->len, 0, pm_len - ctx->len);
Memset(ctx->block + ctx->len, 0, pm_len - ctx->len);
ctx->block[ctx->len] = 0x80;
UNPACK32(len_b, ctx->block + pm_len - 4);