diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-07 15:17:12 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 18:57:10 +0800 |
commit | 153934852892b58f2767e55b2c666bd6628d9780 (patch) | |
tree | 6ef8fc8488bd50493cd5709d712ab6a4f2e88f74 /crypto | |
parent | 1751db839026aade0877f34abe150ef5059b759a (diff) | |
download | linux-crypto-153934852892b58f2767e55b2c666bd6628d9780.tar.gz linux-crypto-153934852892b58f2767e55b2c666bd6628d9780.zip |
crypto: shash - Add shash_instance
This patch adds shash_instance and the associated alloc/free
functions. This is meant to be an instance that with a shash
algorithm under it. Note that the instance itself doesn't have
to be shash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | crypto/shash.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/shash.c b/crypto/shash.c index 2ccc8b00..8f9d8831 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -502,5 +502,12 @@ int crypto_unregister_shash(struct shash_alg *alg) } EXPORT_SYMBOL_GPL(crypto_unregister_shash); +void shash_free_instance(struct crypto_instance *inst) +{ + crypto_drop_spawn(crypto_instance_ctx(inst)); + kfree(shash_instance(inst)); +} +EXPORT_SYMBOL_GPL(shash_free_instance); + MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Synchronous cryptographic hash type"); |