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:
committed by
Herbert Xu
parent
9a42e4eed3
commit
a7c391f04f
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user