diff options
| author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-07-24 06:28:03 -0400 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-08-03 21:27:05 -0400 |
| commit | a7c391f04fe3259fb0417d71fec78ae28f25780e (patch) | |
| tree | ae138006abd68d231231dbea641ea1cb46e43dff /include/crypto | |
| parent | 9a42e4eed3fcd7ba8dff6622384cd08bfe5ef707 (diff) | |
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>
Diffstat (limited to 'include/crypto')
| -rw-r--r-- | include/crypto/algapi.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 436c4c2683c7..fd547f946bf8 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
| @@ -192,7 +192,7 @@ static inline unsigned int crypto_queue_len(struct crypto_queue *queue) | |||
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | void crypto_inc(u8 *a, unsigned int size); | 194 | void crypto_inc(u8 *a, unsigned int size); |
| 195 | void __crypto_xor(u8 *dst, const u8 *src, unsigned int size); | 195 | void __crypto_xor(u8 *dst, const u8 *src1, const u8 *src2, unsigned int size); |
| 196 | 196 | ||
| 197 | static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size) | 197 | static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size) |
| 198 | { | 198 | { |
| @@ -207,7 +207,7 @@ static inline void crypto_xor(u8 *dst, const u8 *src, unsigned int size) | |||
| 207 | size -= sizeof(unsigned long); | 207 | size -= sizeof(unsigned long); |
| 208 | } | 208 | } |
| 209 | } else { | 209 | } else { |
| 210 | __crypto_xor(dst, src, size); | 210 | __crypto_xor(dst, dst, src, size); |
| 211 | } | 211 | } |
| 212 | } | 212 | } |
| 213 | 213 | ||
