aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-06 09:10:45 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-20 21:41:04 -0400
commit7fed0bf271b374be4c98a5880faed4b1128e78e9 (patch)
tree29a1244ed286c500bf64afcef0c571e771ed0cd5 /include/crypto
parentdf89820ebd5bbf4f3c6b5f8ee7d9e983107f6a91 (diff)
[CRYPTO] api: Add common instance initialisation code
This patch adds the helpers crypto_get_attr_alg and crypto_alloc_instance which can be used by simple one-argument templates like hmac to process input parameters and allocate instances. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/algapi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index b20f4bdb23ba..1a598f829417 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -51,6 +51,11 @@ int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg,
51void crypto_drop_spawn(struct crypto_spawn *spawn); 51void crypto_drop_spawn(struct crypto_spawn *spawn);
52struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn); 52struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn);
53 53
54struct crypto_alg *crypto_get_attr_alg(void *param, unsigned int len,
55 u32 type, u32 mask);
56struct crypto_instance *crypto_alloc_instance(const char *name,
57 struct crypto_alg *alg);
58
54static inline void *crypto_instance_ctx(struct crypto_instance *inst) 59static inline void *crypto_instance_ctx(struct crypto_instance *inst)
55{ 60{
56 return inst->__ctx; 61 return inst->__ctx;