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>
This commit is contained in:
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user