diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-08-31 22:21:09 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-12-25 11:01:33 +1100 |
commit | a152bf973ef158c79f29388facf16857afd71083 (patch) | |
tree | d32aaa4a4c3c46b6963f7454e7485cb1e114a078 /crypto/ahash.c | |
parent | bacd8cf0d688bec61b6ae44c11c4a37a952cae02 (diff) | |
download | linux-crypto-a152bf973ef158c79f29388facf16857afd71083.tar.gz linux-crypto-a152bf973ef158c79f29388facf16857afd71083.zip |
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.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c index 7d4e33df..9f98956b 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -112,6 +112,22 @@ int crypto_hash_walk_first(struct ahash_request *req, } EXPORT_SYMBOL_GPL(crypto_hash_walk_first); +int crypto_hash_walk_first_compat(struct hash_desc *hdesc, + struct crypto_hash_walk *walk, + struct scatterlist *sg, unsigned int len) +{ + walk->total = len; + + if (!walk->total) + return 0; + + walk->alignmask = crypto_hash_alignmask(hdesc->tfm); + walk->sg = sg; + walk->flags = hdesc->flags; + + return hash_walk_new_entry(walk); +} + static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) { |