mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[CRYPTO] templates: Pass type/mask when creating instances
This patch passes the type/mask along when constructing instances of templates. This is in preparation for templates that may support multiple types of instances depending on what is requested. For example, the planned software async crypto driver will use this construct. For the moment this allows us to check whether the instance constructed is of the correct type and avoid returning success if the type does not match. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
6158efc090
commit
ebc610e5bc
10 changed files with 117 additions and 37 deletions
|
@ -372,12 +372,21 @@ struct crypto_hash {
|
|||
enum {
|
||||
CRYPTOA_UNSPEC,
|
||||
CRYPTOA_ALG,
|
||||
CRYPTOA_TYPE,
|
||||
__CRYPTOA_MAX,
|
||||
};
|
||||
|
||||
#define CRYPTOA_MAX (__CRYPTOA_MAX - 1)
|
||||
|
||||
struct crypto_attr_alg {
|
||||
char name[CRYPTO_MAX_ALG_NAME];
|
||||
};
|
||||
|
||||
struct crypto_attr_type {
|
||||
u32 type;
|
||||
u32 mask;
|
||||
};
|
||||
|
||||
/*
|
||||
* Transform user interface.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue