aboutsummaryrefslogtreecommitdiff
path: root/src/sha1.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2021-06-14 13:35:48 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-06-30 16:58:48 -0400
commit4e57a54703a5a28681bb86288a971cb83a05359c (patch)
tree66214b68d4fa3f53ec856db65ce5dad0a65d7d20 /src/sha1.c
parentba949f552206dfd27aa54ef1044e2238434fe4be (diff)
downloadseabios-hppa-4e57a54703a5a28681bb86288a971cb83a05359c.zip
seabios-hppa-4e57a54703a5a28681bb86288a971cb83a05359c.tar.gz
seabios-hppa-4e57a54703a5a28681bb86288a971cb83a05359c.tar.bz2
Add implementations for sha256, sha384, and sha512
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Diffstat (limited to 'src/sha1.c')
-rw-r--r--src/sha1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sha1.c b/src/sha1.c
index 2ecb3cb..e6d80c8 100644
--- a/src/sha1.c
+++ b/src/sha1.c
@@ -13,7 +13,7 @@
#include "config.h"
#include "byteorder.h" // cpu_to_*, __swab64
-#include "sha1.h" // sha1
+#include "sha.h" // sha1
#include "string.h" // memcpy
#include "x86.h" // rol
@@ -126,11 +126,11 @@ sha1_do(sha1_ctx *ctx, const u8 *data32, u32 length)
}
-u32
+void
sha1(const u8 *data, u32 length, u8 *hash)
{
if (!CONFIG_TCGBIOS)
- return 0;
+ return;
sha1_ctx ctx = {
.h[0] = 0x67452301,
@@ -143,5 +143,5 @@ sha1(const u8 *data, u32 length, u8 *hash)
sha1_do(&ctx, data, length);
memcpy(hash, &ctx.h[0], 20);
- return 0;
+ return;
}