summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/sha3_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/sha/sha3_internal.h')
-rw-r--r--src/lib/libcrypto/sha/sha3_internal.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/sha/sha3_internal.h b/src/lib/libcrypto/sha/sha3_internal.h
index 1c63b979ef..1b4c6675ad 100644
--- a/src/lib/libcrypto/sha/sha3_internal.h
+++ b/src/lib/libcrypto/sha/sha3_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha3_internal.h,v 1.2 2023/04/15 17:59:50 jsing Exp $ */ 1/* $OpenBSD: sha3_internal.h,v 1.3 2023/04/15 18:07:44 jsing Exp $ */
2/* 2/*
3 * The MIT License (MIT) 3 * The MIT License (MIT)
4 * 4 *
@@ -42,20 +42,20 @@
42 42
43// state context 43// state context
44typedef struct { 44typedef struct {
45 union { // state: 45 union { // state:
46 uint8_t b[200]; // 8-bit bytes 46 uint8_t b[200]; // 8-bit bytes
47 uint64_t q[25]; // 64-bit words 47 uint64_t q[25]; // 64-bit words
48 } st; 48 } st;
49 int pt, rsiz, mdlen; // these don't overflow 49 int pt, rsiz, mdlen; // these don't overflow
50} sha3_ctx_t; 50} sha3_ctx_t;
51 51
52// Compression function. 52// Compression function.
53void sha3_keccakf(uint64_t st[25]); 53void sha3_keccakf(uint64_t st[25]);
54 54
55// OpenSSL - like interfece 55// OpenSSL - like interfece
56int sha3_init(sha3_ctx_t *c, int mdlen); // mdlen = hash output in bytes 56int sha3_init(sha3_ctx_t *c, int mdlen); // mdlen = hash output in bytes
57int sha3_update(sha3_ctx_t *c, const void *data, size_t len); 57int sha3_update(sha3_ctx_t *c, const void *data, size_t len);
58int sha3_final(void *md, sha3_ctx_t *c); // digest goes to md 58int sha3_final(void *md, sha3_ctx_t *c); // digest goes to md
59 59
60// compute a sha3 hash (md) of given byte length from "in" 60// compute a sha3 hash (md) of given byte length from "in"
61void *sha3(const void *in, size_t inlen, void *md, int mdlen); 61void *sha3(const void *in, size_t inlen, void *md, int mdlen);