diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 15:55:52 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 18:57:10 +0800 |
commit | 97eedce1a64a57648ac5e39f03825528c47ba72e (patch) | |
tree | 5dea863a2b51b01b8e436d4e395ef15ae3f4bcd9 /include/crypto | |
parent | 2e4fddd8e420e8f531a34e7a97f9cdb851a6ad13 (diff) | |
download | linux-stable-97eedce1a64a57648ac5e39f03825528c47ba72e.tar.gz linux-stable-97eedce1a64a57648ac5e39f03825528c47ba72e.tar.bz2 linux-stable-97eedce1a64a57648ac5e39f03825528c47ba72e.zip |
crypto: api - Add new style spawn support
This patch modifies the spawn infrastructure to support new style
algorithms like shash. In particular, this means storing the
frontend type in the spawn and using crypto_create_tfm to allocate
the tfm.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/algapi.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 99bb29723130..c9bff92a9e0e 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -61,6 +61,7 @@ struct crypto_spawn { struct list_head list; struct crypto_alg *alg; struct crypto_instance *inst; + const struct crypto_type *frontend; u32 mask; }; @@ -117,9 +118,14 @@ struct crypto_template *crypto_lookup_template(const char *name); int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg, struct crypto_instance *inst, u32 mask); +int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg, + struct crypto_instance *inst, + const struct crypto_type *frontend); + void crypto_drop_spawn(struct crypto_spawn *spawn); struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, u32 mask); +void *crypto_spawn_tfm2(struct crypto_spawn *spawn); static inline void crypto_set_spawn(struct crypto_spawn *spawn, struct crypto_instance *inst) |