aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-08-31 08:21:09 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-24 19:01:33 -0500
commit5f7082ed4f482f05db01d84dbf58190492ebf0ad (patch)
tree34ac4dd0811731457dca0f4bcc440fafc93e517b /crypto/ahash.c
parent67cd080c5070b4f17520c1385f7684206f4987b3 (diff)
crypto: hash - Export shash through hash
This patch allows shash algorithms to be used through the old hash interface. This is a transitional measure so we can convert the underlying algorithms to shash before converting the users across. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 7d4e33dfe212..9f98956b17fc 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -112,6 +112,22 @@ int crypto_hash_walk_first(struct ahash_request *req,
112} 112}
113EXPORT_SYMBOL_GPL(crypto_hash_walk_first); 113EXPORT_SYMBOL_GPL(crypto_hash_walk_first);
114 114
115int crypto_hash_walk_first_compat(struct hash_desc *hdesc,
116 struct crypto_hash_walk *walk,
117 struct scatterlist *sg, unsigned int len)
118{
119 walk->total = len;
120
121 if (!walk->total)
122 return 0;
123
124 walk->alignmask = crypto_hash_alignmask(hdesc->tfm);
125 walk->sg = sg;
126 walk->flags = hdesc->flags;
127
128 return hash_walk_new_entry(walk);
129}
130
115static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, 131static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
116 unsigned int keylen) 132 unsigned int keylen)
117{ 133{