summaryrefslogtreecommitdiffstats
path: root/libtomcrypt/headers/tomcrypt_hash.h
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-07-24 11:54:02 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-24 11:54:02 +0200
commit951eda087f418c2a5ced189fa9d64c8616634dd0 (patch)
tree72050e803bfce0e4c8454011078f10435bb66f04 /libtomcrypt/headers/tomcrypt_hash.h
parentc13723d4a2a9627f4cd85d47954ab1fd3a115dbd (diff)
downloadcryptodev-linux-951eda087f418c2a5ced189fa9d64c8616634dd0.tar.gz
cryptodev-linux-951eda087f418c2a5ced189fa9d64c8616634dd0.tar.xz
cryptodev-linux-951eda087f418c2a5ced189fa9d64c8616634dd0.zip
Use of algo_properties to avoid linear search on a table for each property.
Diffstat (limited to 'libtomcrypt/headers/tomcrypt_hash.h')
-rw-r--r--libtomcrypt/headers/tomcrypt_hash.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libtomcrypt/headers/tomcrypt_hash.h b/libtomcrypt/headers/tomcrypt_hash.h
index 417e481..e4e84e4 100644
--- a/libtomcrypt/headers/tomcrypt_hash.h
+++ b/libtomcrypt/headers/tomcrypt_hash.h
@@ -1,12 +1,14 @@
/* ---- HASH FUNCTIONS ---- */
-int hash_is_valid(int idx);
+struct algo_properties_st;
-int hash_memory(int hash,
+int hash_is_valid(const struct algo_properties_st *hash);
+
+int hash_memory(const struct algo_properties_st *hash,
const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen);
-int hash_memory_multi(int hash, unsigned char *out, unsigned long *outlen,
+int hash_memory_multi(const struct algo_properties_st *hash, unsigned char *out, unsigned long *outlen,
const unsigned char *in, unsigned long inlen, ...);
-int hash_get_oid(int hash, oid_st* st);
+int hash_get_oid(const struct algo_properties_st *hash, oid_st* st);