8 * \brief ARC4 context structure
12 int x
; /*!< permutation index */
13 int y
; /*!< permutation index */
14 unsigned char m
[256]; /*!< permutation table */
23 * \brief ARC4 key schedule
25 * \param ctx ARC4 context to be initialized
26 * \param key the secret key
27 * \param keylen length of the key
29 void arc4_setup( arc4_context
*ctx
, unsigned char *key
, int keylen
);
32 * \brief ARC4 cipher function
34 * \param ctx ARC4 context
35 * \param buf buffer to be processed
36 * \param buflen amount of data in buf
38 void arc4_crypt( arc4_context
*ctx
, unsigned char *buf
, int buflen
);
41 * \brief Checkup routine
43 * \return 0 if successful, or 1 if the test failed
45 int arc4_self_test( int verbose
);