diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-24 03:07:56 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-24 04:25:24 +0200 |
commit | 94ad20f2978e7234579593ac284f9c6cd1426785 (patch) | |
tree | b048aa7b4b0cd246b481eeddc6403250eddb73fe /libtomcrypt/hashes/hash_memory.c | |
parent | 32e0115f32c75f0bffdea599734774376cdf097b (diff) | |
download | cryptodev-linux-94ad20f2978e7234579593ac284f9c6cd1426785.tar.gz cryptodev-linux-94ad20f2978e7234579593ac284f9c6cd1426785.tar.xz cryptodev-linux-94ad20f2978e7234579593ac284f9c6cd1426785.zip |
Replace _ncr_algo_digest_size by direct accesses
Diffstat (limited to 'libtomcrypt/hashes/hash_memory.c')
-rw-r--r-- | libtomcrypt/hashes/hash_memory.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libtomcrypt/hashes/hash_memory.c b/libtomcrypt/hashes/hash_memory.c index 267957a..a452525 100644 --- a/libtomcrypt/hashes/hash_memory.c +++ b/libtomcrypt/hashes/hash_memory.c @@ -30,7 +30,6 @@ int hash_memory(const struct algo_properties_st *hash, const unsigned char *in, { int err; struct hash_data hdata; - int digest_size; LTC_ARGCHK(in != NULL); LTC_ARGCHK(out != NULL); @@ -40,9 +39,8 @@ int hash_memory(const struct algo_properties_st *hash, const unsigned char *in, return err; } - digest_size = _ncr_algo_digest_size(hash->algo); - if (*outlen < digest_size) { - *outlen = digest_size; + if (*outlen < hash->digest_size) { + *outlen = hash->digest_size; return CRYPT_BUFFER_OVERFLOW; } @@ -59,7 +57,7 @@ int hash_memory(const struct algo_properties_st *hash, const unsigned char *in, err = cryptodev_hash_final(&hdata, out); - *outlen = digest_size; + *outlen = hash->digest_size; LBL_ERR: cryptodev_hash_deinit(&hdata); |