aboutsummaryrefslogtreecommitdiff
path: root/crypto/sha
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-11-16 12:14:26 +1000
committerPauli <paul.dale@oracle.com>2020-11-19 07:39:13 +1000
commitb68a947fd23a1e9189399cb9cc4ee75801bb142b (patch)
treefcebc6813e7b2a555f7e3189fdc892fd147b12ea /crypto/sha
parent5687afdf032ac1d0e92958c209f6c493c347fa25 (diff)
downloadopenssl-b68a947fd23a1e9189399cb9cc4ee75801bb142b.zip
openssl-b68a947fd23a1e9189399cb9cc4ee75801bb142b.tar.gz
openssl-b68a947fd23a1e9189399cb9cc4ee75801bb142b.tar.bz2
Rename SHA3 internal functions so they have an ossl_ prefix
These are: keccak_kmac_init(), sha3_final(), sha3_init(), sha3_reset() and sha3_update(). Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13417)
Diffstat (limited to 'crypto/sha')
-rw-r--r--crypto/sha/sha3.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/sha/sha3.c b/crypto/sha/sha3.c
index fafa355..4aa008f 100644
--- a/crypto/sha/sha3.c
+++ b/crypto/sha/sha3.c
@@ -12,18 +12,18 @@
void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r);
-void sha3_reset(KECCAK1600_CTX *ctx)
+void ossl_sha3_reset(KECCAK1600_CTX *ctx)
{
memset(ctx->A, 0, sizeof(ctx->A));
ctx->bufsz = 0;
}
-int sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen)
+int ossl_sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen)
{
size_t bsz = SHA3_BLOCKSIZE(bitlen);
if (bsz <= sizeof(ctx->buf)) {
- sha3_reset(ctx);
+ ossl_sha3_reset(ctx);
ctx->block_size = bsz;
ctx->md_size = bitlen / 8;
ctx->pad = pad;
@@ -33,16 +33,16 @@ int sha3_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen)
return 0;
}
-int keccak_kmac_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen)
+int ossl_keccak_kmac_init(KECCAK1600_CTX *ctx, unsigned char pad, size_t bitlen)
{
- int ret = sha3_init(ctx, pad, bitlen);
+ int ret = ossl_sha3_init(ctx, pad, bitlen);
if (ret)
ctx->md_size *= 2;
return ret;
}
-int sha3_update(KECCAK1600_CTX *ctx, const void *_inp, size_t len)
+int ossl_sha3_update(KECCAK1600_CTX *ctx, const void *_inp, size_t len)
{
const unsigned char *inp = _inp;
size_t bsz = ctx->block_size;
@@ -84,7 +84,7 @@ int sha3_update(KECCAK1600_CTX *ctx, const void *_inp, size_t len)
return 1;
}
-int sha3_final(unsigned char *md, KECCAK1600_CTX *ctx)
+int ossl_sha3_final(unsigned char *md, KECCAK1600_CTX *ctx)
{
size_t bsz = ctx->block_size;
size_t num = ctx->bufsz;