arc4.h 494 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Common values for ARC4 Cipher Algorithm
  4. */
  5. #ifndef _CRYPTO_ARC4_H
  6. #define _CRYPTO_ARC4_H
  7. #include <linux/types.h>
  8. #define ARC4_MIN_KEY_SIZE 1
  9. #define ARC4_MAX_KEY_SIZE 256
  10. #define ARC4_BLOCK_SIZE 1
  11. struct arc4_ctx {
  12. u32 S[256];
  13. u32 x, y;
  14. };
  15. int cifs_arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len);
  16. void cifs_arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len);
  17. #endif /* _CRYPTO_ARC4_H */