diff options
Diffstat (limited to 'src/lib/libcrypto/sha/sha3.c')
| -rw-r--r-- | src/lib/libcrypto/sha/sha3.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/sha/sha3.c b/src/lib/libcrypto/sha/sha3.c index acb7de7d9d..51e7d9c315 100644 --- a/src/lib/libcrypto/sha/sha3.c +++ b/src/lib/libcrypto/sha/sha3.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha3.c,v 1.7 2023/04/15 18:29:26 jsing Exp $ */ | 1 | /* $OpenBSD: sha3.c,v 1.8 2023/04/15 18:30:27 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * The MIT License (MIT) | 3 | * The MIT License (MIT) |
| 4 | * | 4 | * |
| @@ -116,7 +116,7 @@ sha3_keccakf(uint64_t st[25]) | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | int | 118 | int |
| 119 | sha3_init(sha3_ctx_t *c, int mdlen) | 119 | sha3_init(sha3_ctx *c, int mdlen) |
| 120 | { | 120 | { |
| 121 | int i; | 121 | int i; |
| 122 | 122 | ||
| @@ -130,7 +130,7 @@ sha3_init(sha3_ctx_t *c, int mdlen) | |||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | int | 132 | int |
| 133 | sha3_update(sha3_ctx_t *c, const void *data, size_t len) | 133 | sha3_update(sha3_ctx *c, const void *data, size_t len) |
| 134 | { | 134 | { |
| 135 | size_t i; | 135 | size_t i; |
| 136 | int j; | 136 | int j; |
| @@ -149,7 +149,7 @@ sha3_update(sha3_ctx_t *c, const void *data, size_t len) | |||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | int | 151 | int |
| 152 | sha3_final(void *md, sha3_ctx_t *c) | 152 | sha3_final(void *md, sha3_ctx *c) |
| 153 | { | 153 | { |
| 154 | int i; | 154 | int i; |
| 155 | 155 | ||
| @@ -167,7 +167,7 @@ sha3_final(void *md, sha3_ctx_t *c) | |||
| 167 | void * | 167 | void * |
| 168 | sha3(const void *in, size_t inlen, void *md, int mdlen) | 168 | sha3(const void *in, size_t inlen, void *md, int mdlen) |
| 169 | { | 169 | { |
| 170 | sha3_ctx_t sha3; | 170 | sha3_ctx sha3; |
| 171 | 171 | ||
| 172 | sha3_init(&sha3, mdlen); | 172 | sha3_init(&sha3, mdlen); |
| 173 | sha3_update(&sha3, in, inlen); | 173 | sha3_update(&sha3, in, inlen); |
| @@ -178,7 +178,7 @@ sha3(const void *in, size_t inlen, void *md, int mdlen) | |||
| 178 | 178 | ||
| 179 | /* SHAKE128 and SHAKE256 extensible-output functionality. */ | 179 | /* SHAKE128 and SHAKE256 extensible-output functionality. */ |
| 180 | void | 180 | void |
| 181 | shake_xof(sha3_ctx_t *c) | 181 | shake_xof(sha3_ctx *c) |
| 182 | { | 182 | { |
| 183 | c->st.b[c->pt] ^= 0x1F; | 183 | c->st.b[c->pt] ^= 0x1F; |
| 184 | c->st.b[c->rsiz - 1] ^= 0x80; | 184 | c->st.b[c->rsiz - 1] ^= 0x80; |
| @@ -187,7 +187,7 @@ shake_xof(sha3_ctx_t *c) | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void | 189 | void |
| 190 | shake_out(sha3_ctx_t *c, void *out, size_t len) | 190 | shake_out(sha3_ctx *c, void *out, size_t len) |
| 191 | { | 191 | { |
| 192 | size_t i; | 192 | size_t i; |
| 193 | int j; | 193 | int j; |
