|
@@ -649,5 +649,16 @@ struct hash_alg_common *ahash_attr_alg(struct rtattr *rta, u32 type, u32 mask)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(ahash_attr_alg);
|
|
EXPORT_SYMBOL_GPL(ahash_attr_alg);
|
|
|
|
|
|
|
|
+bool crypto_hash_alg_has_setkey(struct hash_alg_common *halg)
|
|
|
|
+{
|
|
|
|
+ struct crypto_alg *alg = &halg->base;
|
|
|
|
+
|
|
|
|
+ if (alg->cra_type != &crypto_ahash_type)
|
|
|
|
+ return crypto_shash_alg_has_setkey(__crypto_shash_alg(alg));
|
|
|
|
+
|
|
|
|
+ return __crypto_ahash_alg(alg)->setkey != NULL;
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL_GPL(crypto_hash_alg_has_setkey);
|
|
|
|
+
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_DESCRIPTION("Asynchronous cryptographic hash type");
|
|
MODULE_DESCRIPTION("Asynchronous cryptographic hash type");
|