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 | 2e4fddd8e420e8f531a34e7a97f9cdb851a6ad13 (patch) | |
tree | 8f708150f9dca8286a0b6f1d347bda657a3c57a9 /crypto/shash.c | |
parent | 70ec7bb91ad0d6cce84c8e17f8cbb608dda7b18c (diff) | |
download | linux-3.10-2e4fddd8e420e8f531a34e7a97f9cdb851a6ad13.tar.gz linux-3.10-2e4fddd8e420e8f531a34e7a97f9cdb851a6ad13.tar.bz2 linux-3.10-2e4fddd8e420e8f531a34e7a97f9cdb851a6ad13.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 'crypto/shash.c')
-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 2ccc8b0076c..8f9d8831e29 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"); |