summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/opencrypto/xform_sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/opencrypto/xform_sha1.c')
-rw-r--r--freebsd/sys/opencrypto/xform_sha1.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/freebsd/sys/opencrypto/xform_sha1.c b/freebsd/sys/opencrypto/xform_sha1.c
index 974dfb8a..44ac8c0e 100644
--- a/freebsd/sys/opencrypto/xform_sha1.c
+++ b/freebsd/sys/opencrypto/xform_sha1.c
@@ -57,14 +57,26 @@ static void SHA1Init_int(void *);
static int SHA1Update_int(void *, const u_int8_t *, u_int16_t);
static void SHA1Final_int(u_int8_t *, void *);
+/* Plain hash */
+struct auth_hash auth_hash_sha1 = {
+ .type = CRYPTO_SHA1,
+ .name = "SHA1",
+ .hashsize = SHA1_HASH_LEN,
+ .ctxsize = sizeof(SHA1_CTX),
+ .blocksize = SHA1_BLOCK_LEN,
+ .Init = SHA1Init_int,
+ .Update = SHA1Update_int,
+ .Final = SHA1Final_int,
+};
+
/* Authentication instances */
struct auth_hash auth_hash_hmac_sha1 = {
.type = CRYPTO_SHA1_HMAC,
.name = "HMAC-SHA1",
- .keysize = SHA1_HMAC_BLOCK_LEN,
+ .keysize = SHA1_BLOCK_LEN,
.hashsize = SHA1_HASH_LEN,
.ctxsize = sizeof(SHA1_CTX),
- .blocksize = SHA1_HMAC_BLOCK_LEN,
+ .blocksize = SHA1_BLOCK_LEN,
.Init = SHA1Init_int,
.Update = SHA1Update_int,
.Final = SHA1Final_int,