summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-01-01 18:37:02 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2007-05-02 14:38:31 +1000
commitebc610e5bc76df073221e64e86c3f7533a09ea40 (patch)
treed53f4fa3da412f6df4b5891e23ca7c7607a3a5ce /include/linux
parent6158efc09016d3186263f6fd3a50667446ec4008 (diff)
downloadkernel-crypto-ebc610e5bc76df073221e64e86c3f7533a09ea40.tar.gz
kernel-crypto-ebc610e5bc76df073221e64e86c3f7533a09ea40.tar.xz
kernel-crypto-ebc610e5bc76df073221e64e86c3f7533a09ea40.zip
[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')
-rw-r--r--include/linux/crypto.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index d4d05313280..67830e7c2c3 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -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.
*/