mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
crypto: algapi - use separate dst and src operands for __crypto_xor()
In preparation of introducing crypto_xor_cpy(), which will use separate operands for input and output, modify the __crypto_xor() implementation, which it will share with the existing crypto_xor(), which provides the actual functionality when not using the inline version. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
9a42e4eed3
commit
a7c391f04f
2 changed files with 17 additions and 12 deletions
|
@ -192,7 +192,7 @@ static inline unsigned int crypto_queue_len(struct crypto_queue *queue)
|
|||
}
|
||||
|
||||
void crypto_inc(u8 *a, unsigned int size);
|
||||
void __crypto_xor(u8 *dst, const u8 *src, unsigned int size);
|
||||
void __crypto_xor(u8 *dst, const u8 *src1, const u8 *src2, unsigned int size);
|
||||
|
||||
static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size)
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size)
|
|||
size -= sizeof(unsigned long);
|
||||
}
|
||||
} else {
|
||||
__crypto_xor(dst, src, size);
|
||||
__crypto_xor(dst, dst, src, size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue