fed6fcae654fa678a672b569fd157e459377cd1e
[openssl.git] / include / openssl / rc4.h
1 /*
2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 #ifndef OPENSSL_RC4_H
11 # define OPENSSL_RC4_H
12 # pragma once
13
14 # include <openssl/macros.h>
15 # if !OPENSSL_API_3
16 #  define HEADER_RC4_H
17 # endif
18
19 # include <openssl/opensslconf.h>
20
21 # ifndef OPENSSL_NO_RC4
22 # include <stddef.h>
23 #ifdef  __cplusplus
24 extern "C" {
25 #endif
26
27 typedef struct rc4_key_st {
28     RC4_INT x, y;
29     RC4_INT data[256];
30 } RC4_KEY;
31
32 const char *RC4_options(void);
33 void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
34 void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
35          unsigned char *outdata);
36
37 # ifdef  __cplusplus
38 }
39 # endif
40 # endif
41
42 #endif