]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/ccrc4.h
5 * Created by Fabrice Gautier on 12/22/10.
6 * Copyright 2010,2011 Apple, Inc. All rights reserved.
10 #ifndef _CORECRYPTO_CCRC4_H_
11 #define _CORECRYPTO_CCRC4_H_
13 #include <corecrypto/ccmode.h>
15 cc_aligned_struct(16) ccrc4_ctx
;
17 /* Declare a rc4 key named _name_. Pass the size field of a struct ccmode_ecb
19 #define ccrc4_ctx_decl(_size_, _name_) cc_ctx_decl(ccrc4_ctx, _size_, _name_)
20 #define ccrc4_ctx_clear(_size_, _name_) cc_zero(_size_, _name_)
23 size_t size
; /* first argument to ccrc4_ctx_decl(). */
24 void (*init
)(ccrc4_ctx
*ctx
, size_t key_len
, const void *key
);
25 void (*crypt
)(ccrc4_ctx
*ctx
, unsigned long nbytes
, const void *in
, void *out
);
29 const struct ccrc4_info
*ccrc4(void);
31 extern const struct ccrc4_info ccrc4_eay
;
36 unsigned long datalen
;
41 int ccrc4_test(const struct ccrc4_info
*rc4
, const struct ccrc4_vector
*v
);
43 #endif /* _CORECRYPTO_CCRC4_H_ */