summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2023-04-15 19:30:31 +0000
committerjsing <>2023-04-15 19:30:31 +0000
commit96807686344989d5ad99a653e9d43c4e8b89c77a (patch)
tree253e98fc303ee7df350b7ebbc5d775431b2d0ded /src/lib
parentf5f53d20559e63b9ce2cd0a84f8564b5751f3f2c (diff)
downloadopenbsd-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.c14
-rw-r--r--src/lib/libcrypto/sha/sha3_internal.h4
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
167void *
168sha3(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. */
180void 168void
181shake_xof(sha3_ctx *c) 169shake_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);
67int sha3_update(sha3_ctx *c, const void *data, size_t len); 67int sha3_update(sha3_ctx *c, const void *data, size_t len);
68int sha3_final(void *md, sha3_ctx *c); 68int sha3_final(void *md, sha3_ctx *c);
69 69
70void *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)