diff options
| author | jsing <> | 2023-04-15 19:30:31 +0000 |
|---|---|---|
| committer | jsing <> | 2023-04-15 19:30:31 +0000 |
| commit | 379c0e1b83d3b3687c62a136279d55b0e4141de6 (patch) | |
| tree | 253e98fc303ee7df350b7ebbc5d775431b2d0ded /src | |
| parent | 381963737afddc578047e2ddb396b26e46053de6 (diff) | |
| download | openbsd-379c0e1b83d3b3687c62a136279d55b0e4141de6.tar.gz openbsd-379c0e1b83d3b3687c62a136279d55b0e4141de6.tar.bz2 openbsd-379c0e1b83d3b3687c62a136279d55b0e4141de6.zip | |
Remove sha3() function, which will not be used or exposed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/sha/sha3.c | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha3_internal.h | 4 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/lib/libcrypto/sha/sha3.c b/src/lib/libcrypto/sha/sha3.c index 0ef5bf216e..c775e57ea3 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.12 2023/04/15 19:29:20 jsing Exp $ */ | 1 | /* $OpenBSD: sha3.c,v 1.13 2023/04/15 19:30:31 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * The MIT License (MIT) | 3 | * The MIT License (MIT) |
| 4 | * | 4 | * |
| @@ -164,18 +164,6 @@ sha3_final(void *md, sha3_ctx *c) | |||
| 164 | return 1; | 164 | return 1; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | void * | ||
| 168 | sha3(const void *in, size_t inlen, void *md, int mdlen) | ||
| 169 | { | ||
| 170 | sha3_ctx sha3; | ||
| 171 | |||
| 172 | sha3_init(&sha3, mdlen); | ||
| 173 | sha3_update(&sha3, in, inlen); | ||
| 174 | sha3_final(md, &sha3); | ||
| 175 | |||
| 176 | return md; | ||
| 177 | } | ||
| 178 | |||
| 179 | /* SHAKE128 and SHAKE256 extensible-output functionality. */ | 167 | /* SHAKE128 and SHAKE256 extensible-output functionality. */ |
| 180 | void | 168 | void |
| 181 | shake_xof(sha3_ctx *c) | 169 | shake_xof(sha3_ctx *c) |
diff --git a/src/lib/libcrypto/sha/sha3_internal.h b/src/lib/libcrypto/sha/sha3_internal.h index 9b5b9e2b6a..7aaa016050 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.10 2023/04/15 19:29:20 jsing Exp $ */ | 1 | /* $OpenBSD: sha3_internal.h,v 1.11 2023/04/15 19:30:31 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * The MIT License (MIT) | 3 | * The MIT License (MIT) |
| 4 | * | 4 | * |
| @@ -67,8 +67,6 @@ int sha3_init(sha3_ctx *c, int mdlen); | |||
| 67 | int sha3_update(sha3_ctx *c, const void *data, size_t len); | 67 | int sha3_update(sha3_ctx *c, const void *data, size_t len); |
| 68 | int sha3_final(void *md, sha3_ctx *c); | 68 | int sha3_final(void *md, sha3_ctx *c); |
| 69 | 69 | ||
| 70 | void *sha3(const void *in, size_t inlen, void *md, int mdlen); | ||
| 71 | |||
| 72 | /* SHAKE128 and SHAKE256 extensible-output functions. */ | 70 | /* SHAKE128 and SHAKE256 extensible-output functions. */ |
| 73 | #define shake128_init(c) sha3_init(c, 16) | 71 | #define shake128_init(c) sha3_init(c, 16) |
| 74 | #define shake256_init(c) sha3_init(c, 32) | 72 | #define shake256_init(c) sha3_init(c, 32) |
