mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
[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>
This commit is contained in:
parent
2614de1b9a
commit
7607bd8ff0
2 changed files with 28 additions and 10 deletions
|
@ -91,6 +91,7 @@ struct blkcipher_walk {
|
|||
u8 *iv;
|
||||
|
||||
int flags;
|
||||
unsigned int blocksize;
|
||||
};
|
||||
|
||||
extern const struct crypto_type crypto_ablkcipher_type;
|
||||
|
@ -129,6 +130,9 @@ int blkcipher_walk_virt(struct blkcipher_desc *desc,
|
|||
struct blkcipher_walk *walk);
|
||||
int blkcipher_walk_phys(struct blkcipher_desc *desc,
|
||||
struct blkcipher_walk *walk);
|
||||
int blkcipher_walk_virt_block(struct blkcipher_desc *desc,
|
||||
struct blkcipher_walk *walk,
|
||||
unsigned int blocksize);
|
||||
|
||||
static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue