mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[CRYPTO] api: Add support for multiple template parameters
This patch adds support for having multiple parameters to a template, separated by a comma. It also adds support for integer parameters in addition to the current algorithm parameter type. This will be used by the authenc template which will have four parameters: the authentication algorithm, the encryption algorithm, the authentication size and the encryption key length. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
1ae978208e
commit
39e1ee011f
3 changed files with 83 additions and 26 deletions
|
@ -425,11 +425,15 @@ enum {
|
|||
CRYPTOA_UNSPEC,
|
||||
CRYPTOA_ALG,
|
||||
CRYPTOA_TYPE,
|
||||
CRYPTOA_U32,
|
||||
__CRYPTOA_MAX,
|
||||
};
|
||||
|
||||
#define CRYPTOA_MAX (__CRYPTOA_MAX - 1)
|
||||
|
||||
/* Maximum number of (rtattr) parameters for each template. */
|
||||
#define CRYPTO_MAX_ATTRS 32
|
||||
|
||||
struct crypto_attr_alg {
|
||||
char name[CRYPTO_MAX_ALG_NAME];
|
||||
};
|
||||
|
@ -439,6 +443,10 @@ struct crypto_attr_type {
|
|||
u32 mask;
|
||||
};
|
||||
|
||||
struct crypto_attr_u32 {
|
||||
u32 num;
|
||||
};
|
||||
|
||||
/*
|
||||
* Transform user interface.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue