diff options
author | jsing <> | 2023-04-15 19:30:31 +0000 |
---|---|---|
committer | jsing <> | 2023-04-15 19:30:31 +0000 |
commit | 96807686344989d5ad99a653e9d43c4e8b89c77a (patch) | |
tree | 253e98fc303ee7df350b7ebbc5d775431b2d0ded /src/lib | |
parent | f5f53d20559e63b9ce2cd0a84f8564b5751f3f2c (diff) | |
download | openbsd-96807686344989d5ad99a653e9d43c4e8b89c77a.tar.gz openbsd-96807686344989d5ad99a653e9d43c4e8b89c77a.tar.bz2 openbsd-96807686344989d5ad99a653e9d43c4e8b89c77a.zip |
Remove sha3() function, which will not be used or exposed.
Diffstat (limited to 'src/lib')
-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) |