aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-04 03:24:05 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:48 -0400
commit7607bd8ff03b8af5af887931318cb2bb20361856 (patch)
treef714390d344511d65f7b866857102fbeb1d13741 /include
parent2614de1b9af5a9e49cda64b394e1348159565bd5 (diff)
[CRYPTO] blkcipher: Added blkcipher_walk_virt_block
This patch adds the helper blkcipher_walk_virt_block which is similar to blkcipher_walk_virt but uses a supplied block size instead of the block size of the block cipher. This is useful for CTR where the block size is 1 but we still want to walk by the block size of the underlying cipher. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/algapi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 4af72dc21202..b9b05d399d2b 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -91,6 +91,7 @@ struct blkcipher_walk {
91 u8 *iv; 91 u8 *iv;
92 92
93 int flags; 93 int flags;
94 unsigned int blocksize;
94}; 95};
95 96
96extern const struct crypto_type crypto_ablkcipher_type; 97extern const struct crypto_type crypto_ablkcipher_type;
@@ -129,6 +130,9 @@ int blkcipher_walk_virt(struct blkcipher_desc *desc,
129 struct blkcipher_walk *walk); 130 struct blkcipher_walk *walk);
130int blkcipher_walk_phys(struct blkcipher_desc *desc, 131int blkcipher_walk_phys(struct blkcipher_desc *desc,
131 struct blkcipher_walk *walk); 132 struct blkcipher_walk *walk);
133int blkcipher_walk_virt_block(struct blkcipher_desc *desc,
134 struct blkcipher_walk *walk,
135 unsigned int blocksize);
132 136
133static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm) 137static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm)
134{ 138{