aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/blkcipher.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-01-24 04:50:26 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2007-02-06 17:21:01 -0500
commit27d2a3300755387d2fec231d37944907ff992ce8 (patch)
treec42138c0160b8f0aa3d79860557514e73577e885 /crypto/blkcipher.c
parent2e306ee016fd4750289e65c3b1856db569f1f3f2 (diff)
[CRYPTO] api: Allow multiple frontends per backend
This patch adds support for multiple frontend types for each backend algorithm by passing the type and mask through to the backend type init function. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/blkcipher.c')
-rw-r--r--crypto/blkcipher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index cbb4c4e5c229..b5befe8c3a96 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -349,7 +349,8 @@ static int setkey(struct crypto_tfm *tfm, const u8 *key,
349 return cipher->setkey(tfm, key, keylen); 349 return cipher->setkey(tfm, key, keylen);
350} 350}
351 351
352static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg) 352static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg, u32 type,
353 u32 mask)
353{ 354{
354 struct blkcipher_alg *cipher = &alg->cra_blkcipher; 355 struct blkcipher_alg *cipher = &alg->cra_blkcipher;
355 unsigned int len = alg->cra_ctxsize; 356 unsigned int len = alg->cra_ctxsize;
@@ -362,7 +363,7 @@ static unsigned int crypto_blkcipher_ctxsize(struct crypto_alg *alg)
362 return len; 363 return len;
363} 364}
364 365
365static int crypto_init_blkcipher_ops(struct crypto_tfm *tfm) 366static int crypto_init_blkcipher_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
366{ 367{
367 struct blkcipher_tfm *crt = &tfm->crt_blkcipher; 368 struct blkcipher_tfm *crt = &tfm->crt_blkcipher;
368 struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher; 369 struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher;