1/*
2 * ccrc4.h
3 * corecrypto
4 *
5 * Created on 12/22/2010
6 *
7 * Copyright (c) 2010,2011,2012,2013,2014,2015 Apple Inc. All rights reserved.
8 *
9 */
10
11#ifndef _CORECRYPTO_CCRC4_H_
12#define _CORECRYPTO_CCRC4_H_
13
14#include <corecrypto/ccmode.h>
15
16cc_aligned_struct(16) ccrc4_ctx;
17
18/* Declare a rc4 key named _name_. Pass the size field of a struct ccmode_ecb
19 for _size_. */
20#define ccrc4_ctx_decl(_size_, _name_) cc_ctx_decl(ccrc4_ctx, _size_, _name_)
21#define ccrc4_ctx_clear(_size_, _name_) cc_clear(_size_, _name_)
22
23struct ccrc4_info {
24 size_t size; /* first argument to ccrc4_ctx_decl(). */
25 void (*init)(ccrc4_ctx *ctx, size_t key_len, const void *key);
26 void (*crypt)(ccrc4_ctx *ctx, size_t nbytes, const void *in, void *out);
27};
28
29const struct ccrc4_info *ccrc4(void);
30
31extern const struct ccrc4_info ccrc4_eay;
32
33#endif /* _CORECRYPTO_CCRC4_H_ */
34