mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>
This commit is contained in:
parent
70ec7bb91a
commit
2e4fddd8e4
2 changed files with 33 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue