diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-01-01 02:37:02 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-05-02 00:38:31 -0400 |
commit | ebc610e5bc76df073221e64e86c3f7533a09ea40 (patch) | |
tree | d53f4fa3da412f6df4b5891e23ca7c7607a3a5ce /include/linux/crypto.h | |
parent | 6158efc09016d3186263f6fd3a50667446ec4008 (diff) |
[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>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r-- | include/linux/crypto.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index d4d05313280c..67830e7c2c31 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -372,12 +372,21 @@ struct crypto_hash { | |||
372 | enum { | 372 | enum { |
373 | CRYPTOA_UNSPEC, | 373 | CRYPTOA_UNSPEC, |
374 | CRYPTOA_ALG, | 374 | CRYPTOA_ALG, |
375 | CRYPTOA_TYPE, | ||
376 | __CRYPTOA_MAX, | ||
375 | }; | 377 | }; |
376 | 378 | ||
379 | #define CRYPTOA_MAX (__CRYPTOA_MAX - 1) | ||
380 | |||
377 | struct crypto_attr_alg { | 381 | struct crypto_attr_alg { |
378 | char name[CRYPTO_MAX_ALG_NAME]; | 382 | char name[CRYPTO_MAX_ALG_NAME]; |
379 | }; | 383 | }; |
380 | 384 | ||
385 | struct crypto_attr_type { | ||
386 | u32 type; | ||
387 | u32 mask; | ||
388 | }; | ||
389 | |||
381 | /* | 390 | /* |
382 | * Transform user interface. | 391 | * Transform user interface. |
383 | */ | 392 | */ |