mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
crypto: api - Add crypto_attr_alg2 helper
This patch adds the helper crypto_attr_alg2 which is similar to crypto_attr_alg but takes an extra frontend argument. This is intended to be used by new style algorithm types such as shash. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
942969992d
commit
d06854f024
4 changed files with 40 additions and 13 deletions
|
@ -136,7 +136,16 @@ static inline void crypto_set_spawn(struct crypto_spawn *spawn,
|
|||
struct crypto_attr_type *crypto_get_attr_type(struct rtattr **tb);
|
||||
int crypto_check_attr_type(struct rtattr **tb, u32 type);
|
||||
const char *crypto_attr_alg_name(struct rtattr *rta);
|
||||
struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask);
|
||||
struct crypto_alg *crypto_attr_alg2(struct rtattr *rta,
|
||||
const struct crypto_type *frontend,
|
||||
u32 type, u32 mask);
|
||||
|
||||
static inline struct crypto_alg *crypto_attr_alg(struct rtattr *rta,
|
||||
u32 type, u32 mask)
|
||||
{
|
||||
return crypto_attr_alg2(rta, NULL, type, mask);
|
||||
}
|
||||
|
||||
int crypto_attr_u32(struct rtattr *rta, u32 *num);
|
||||
void *crypto_alloc_instance2(const char *name, struct crypto_alg *alg,
|
||||
unsigned int head);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue