diff options
author | Pauli <paul.dale@oracle.com> | 2020-11-16 11:52:39 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-11-19 07:38:53 +1000 |
commit | 627b73cc72d0c42a01c464b8b567ea0f7d907e05 (patch) | |
tree | d3bb5ce6b30706259e193ab92bdb4703f71b46cb /crypto/md5/md5_sha1.c | |
parent | 3800cc6f4d285699210da496a42434bd2b42e065 (diff) |
Rename md5_sha1_* ossl_md5_sha1_*
md5_sha1_init(), md5_sha1_update(), md5_sha1_final() and md5_sha1_ctrl().
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13417)
Diffstat (limited to 'crypto/md5/md5_sha1.c')
-rw-r--r-- | crypto/md5/md5_sha1.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/md5/md5_sha1.c b/crypto/md5/md5_sha1.c index db359dba2f..56defab163 100644 --- a/crypto/md5/md5_sha1.c +++ b/crypto/md5/md5_sha1.c @@ -17,28 +17,28 @@ #include "prov/md5_sha1.h" #include <openssl/evp.h> -int md5_sha1_init(MD5_SHA1_CTX *mctx) +int ossl_md5_sha1_init(MD5_SHA1_CTX *mctx) { if (!MD5_Init(&mctx->md5)) return 0; return SHA1_Init(&mctx->sha1); } -int md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count) +int ossl_md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count) { if (!MD5_Update(&mctx->md5, data, count)) return 0; return SHA1_Update(&mctx->sha1, data, count); } -int md5_sha1_final(unsigned char *md, MD5_SHA1_CTX *mctx) +int ossl_md5_sha1_final(unsigned char *md, MD5_SHA1_CTX *mctx) { if (!MD5_Final(md, &mctx->md5)) return 0; return SHA1_Final(md + MD5_DIGEST_LENGTH, &mctx->sha1); } -int md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms) +int ossl_md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms) { unsigned char padtmp[48]; unsigned char md5tmp[MD5_DIGEST_LENGTH]; @@ -58,7 +58,7 @@ int md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms) * with master secret and pad_1. */ - if (md5_sha1_update(mctx, ms, mslen) <= 0) + if (ossl_md5_sha1_update(mctx, ms, mslen) <= 0) return 0; /* Set padtmp to pad_1 value */ @@ -78,10 +78,10 @@ int md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms) /* Reinitialise context */ - if (!md5_sha1_init(mctx)) + if (!ossl_md5_sha1_init(mctx)) return 0; - if (md5_sha1_update(mctx, ms, mslen) <= 0) + if (ossl_md5_sha1_update(mctx, ms, mslen) <= 0) return 0; /* Set padtmp to pad_2 value */ |