Lines Matching refs:alg
55 struct ahash_alg alg; member
66 struct shash_alg alg; member
87 int crypto_register_ahash(struct ahash_alg *alg);
88 void crypto_unregister_ahash(struct ahash_alg *alg);
98 static inline bool crypto_shash_alg_has_setkey(struct shash_alg *alg) in crypto_shash_alg_has_setkey() argument
100 return alg->setkey != shash_no_setkey; in crypto_shash_alg_has_setkey()
105 static inline bool crypto_shash_alg_needs_key(struct shash_alg *alg) in crypto_shash_alg_needs_key() argument
107 return crypto_shash_alg_has_setkey(alg) && in crypto_shash_alg_needs_key()
108 !(alg->base.cra_flags & CRYPTO_ALG_OPTIONAL_KEY); in crypto_shash_alg_needs_key()
111 static inline bool crypto_hash_alg_needs_key(struct hash_alg_common *alg) in crypto_hash_alg_needs_key() argument
113 return crypto_hash_alg_has_setkey(alg) && in crypto_hash_alg_needs_key()
114 !(alg->base.cra_flags & CRYPTO_ALG_OPTIONAL_KEY); in crypto_hash_alg_needs_key()
135 return __crypto_hash_alg_common(spawn->base.alg); in crypto_spawn_ahash_alg()
138 int crypto_register_shash(struct shash_alg *alg);
139 void crypto_unregister_shash(struct shash_alg *alg);
158 return __crypto_shash_alg(spawn->base.alg); in crypto_spawn_shash_alg()
175 static inline struct ahash_alg *__crypto_ahash_alg(struct crypto_alg *alg) in __crypto_ahash_alg() argument
177 return container_of(__crypto_hash_alg_common(alg), struct ahash_alg, in __crypto_ahash_alg()