diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-04-06 14:36:21 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-04-06 08:12:19 +0200 |
commit | 49ab2df28a9399fef8d37677404304ac88115b45 (patch) | |
tree | 29ba5f83e3088272f7c9a8be910adcbacb7246c7 /lib/crypto/hmacsha256.c | |
parent | 5adf85e6afa949f8e636327bb3446aa4f41948a7 (diff) | |
download | samba-49ab2df28a9399fef8d37677404304ac88115b45.tar.gz samba-49ab2df28a9399fef8d37677404304ac88115b45.tar.bz2 samba-49ab2df28a9399fef8d37677404304ac88115b45.zip |
lib/crypto: rename the SHA256_ functions to samba_SHA256_
this prevents a symbol duplication with the openssl library, which may
be linked in via a secondary library dependency
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/crypto/hmacsha256.c')
-rw-r--r-- | lib/crypto/hmacsha256.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/crypto/hmacsha256.c b/lib/crypto/hmacsha256.c index 1a31441297..36e321a094 100644 --- a/lib/crypto/hmacsha256.c +++ b/lib/crypto/hmacsha256.c @@ -42,9 +42,9 @@ _PUBLIC_ void hmac_sha256_init(const uint8_t *key, size_t key_len, struct HMACSH { SHA256_CTX tctx; - SHA256_Init(&tctx); - SHA256_Update(&tctx, key, key_len); - SHA256_Final(tk, &tctx); + samba_SHA256_Init(&tctx); + samba_SHA256_Update(&tctx, key, key_len); + samba_SHA256_Final(tk, &tctx); key = tk; key_len = SHA256_DIGEST_LENGTH; @@ -63,8 +63,8 @@ _PUBLIC_ void hmac_sha256_init(const uint8_t *key, size_t key_len, struct HMACSH ctx->k_opad[i] ^= 0x5c; } - SHA256_Init(&ctx->ctx); - SHA256_Update(&ctx->ctx, ctx->k_ipad, 64); + samba_SHA256_Init(&ctx->ctx); + samba_SHA256_Update(&ctx->ctx, ctx->k_ipad, 64); } /*********************************************************************** @@ -72,7 +72,7 @@ _PUBLIC_ void hmac_sha256_init(const uint8_t *key, size_t key_len, struct HMACSH ***********************************************************************/ _PUBLIC_ void hmac_sha256_update(const uint8_t *data, size_t data_len, struct HMACSHA256Context *ctx) { - SHA256_Update(&ctx->ctx, data, data_len); /* then text of datagram */ + samba_SHA256_Update(&ctx->ctx, data, data_len); /* then text of datagram */ } /*********************************************************************** @@ -82,10 +82,10 @@ _PUBLIC_ void hmac_sha256_final(uint8_t digest[SHA256_DIGEST_LENGTH], struct HMA { SHA256_CTX ctx_o; - SHA256_Final(digest, &ctx->ctx); + samba_SHA256_Final(digest, &ctx->ctx); - SHA256_Init(&ctx_o); - SHA256_Update(&ctx_o, ctx->k_opad, 64); - SHA256_Update(&ctx_o, digest, SHA256_DIGEST_LENGTH); - SHA256_Final(digest, &ctx_o); + samba_SHA256_Init(&ctx_o); + samba_SHA256_Update(&ctx_o, ctx->k_opad, 64); + samba_SHA256_Update(&ctx_o, digest, SHA256_DIGEST_LENGTH); + samba_SHA256_Final(digest, &ctx_o); } |