diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-19 12:00:53 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-19 12:00:53 +0200 |
commit | 035b7bf3544ab9927dc2d64cf1e3214237ff0f71 (patch) | |
tree | 64963c5c050dc741b5091478bafeef9f9691fe6d /libtomcrypt | |
parent | e2ff6f32b197ff5d171676aca318a73aeb3fcbe3 (diff) | |
download | cryptodev-linux-035b7bf3544ab9927dc2d64cf1e3214237ff0f71.tar.gz cryptodev-linux-035b7bf3544ab9927dc2d64cf1e3214237ff0f71.tar.xz cryptodev-linux-035b7bf3544ab9927dc2d64cf1e3214237ff0f71.zip |
hash_reset() was combined with hash_init() to avoid requiring two calls for hash initialization.
Diffstat (limited to 'libtomcrypt')
-rw-r--r-- | libtomcrypt/hashes/hash_memory.c | 6 | ||||
-rw-r--r-- | libtomcrypt/hashes/hash_memory_multi.c | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/libtomcrypt/hashes/hash_memory.c b/libtomcrypt/hashes/hash_memory.c index 7c0aa4e..274c208 100644 --- a/libtomcrypt/hashes/hash_memory.c +++ b/libtomcrypt/hashes/hash_memory.c @@ -52,12 +52,6 @@ int hash_memory(int hash, const unsigned char *in, unsigned long inlen, unsigned goto LBL_ERR; } - err = cryptodev_hash_reset( &hdata); - if (err < 0) { - err = CRYPT_INVALID_HASH; - goto LBL_ERR; - } - if ((err = _cryptodev_hash_update(&hdata, in, inlen)) < 0) { err = CRYPT_ERROR; goto LBL_ERR; diff --git a/libtomcrypt/hashes/hash_memory_multi.c b/libtomcrypt/hashes/hash_memory_multi.c index 52e8076..6a85f65 100644 --- a/libtomcrypt/hashes/hash_memory_multi.c +++ b/libtomcrypt/hashes/hash_memory_multi.c @@ -58,12 +58,6 @@ int hash_memory_multi(int hash, unsigned char *out, unsigned long *outlen, goto LBL_ERR; } - err = cryptodev_hash_reset( &hdata); - if (err < 0) { - err = CRYPT_INVALID_HASH; - goto LBL_ERR; - } - va_start(args, inlen); curptr = in; curlen = inlen; |