Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  * Common values for ARC4 Cipher Algorithm
0004  */
0005 
0006 #ifndef _CRYPTO_ARC4_H
0007 #define _CRYPTO_ARC4_H
0008 
0009 #include <linux/types.h>
0010 
0011 #define ARC4_MIN_KEY_SIZE   1
0012 #define ARC4_MAX_KEY_SIZE   256
0013 #define ARC4_BLOCK_SIZE     1
0014 
0015 struct arc4_ctx {
0016     u32 S[256];
0017     u32 x, y;
0018 };
0019 
0020 int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len);
0021 void arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len);
0022 
0023 #endif /* _CRYPTO_ARC4_H */