mbed TLS v2.16.3
include
mbedtls
arc4.h
Go to the documentation of this file.
1
9
/*
10
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
11
* SPDX-License-Identifier: Apache-2.0
12
*
13
* Licensed under the Apache License, Version 2.0 (the "License"); you may
14
* not use this file except in compliance with the License.
15
* You may obtain a copy of the License at
16
*
17
* http://www.apache.org/licenses/LICENSE-2.0
18
*
19
* Unless required by applicable law or agreed to in writing, software
20
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
21
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
* See the License for the specific language governing permissions and
23
* limitations under the License.
24
*
25
* This file is part of mbed TLS (https://tls.mbed.org)
26
*
27
*/
28
#ifndef MBEDTLS_ARC4_H
29
#define MBEDTLS_ARC4_H
30
31
#if !defined(MBEDTLS_CONFIG_FILE)
32
#include "
config.h
"
33
#else
34
#include MBEDTLS_CONFIG_FILE
35
#endif
36
37
#include <stddef.h>
38
39
/* MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED is deprecated and should not be used. */
40
#define MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED -0x0019
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
45
46
#if !defined(MBEDTLS_ARC4_ALT)
47
// Regular implementation
48
//
49
57
typedef
struct
mbedtls_arc4_context
58
{
59
int
x
;
60
int
y
;
61
unsigned
char
m
[256];
62
}
63
mbedtls_arc4_context
;
64
65
#else
/* MBEDTLS_ARC4_ALT */
66
#include "arc4_alt.h"
67
#endif
/* MBEDTLS_ARC4_ALT */
68
79
void
mbedtls_arc4_init
(
mbedtls_arc4_context
*ctx );
80
91
void
mbedtls_arc4_free
(
mbedtls_arc4_context
*ctx );
92
105
void
mbedtls_arc4_setup
(
mbedtls_arc4_context
*ctx,
const
unsigned
char
*key,
106
unsigned
int
keylen );
107
123
int
mbedtls_arc4_crypt
(
mbedtls_arc4_context
*ctx,
size_t
length,
const
unsigned
char
*input,
124
unsigned
char
*output );
125
126
#if defined(MBEDTLS_SELF_TEST)
127
138
int
mbedtls_arc4_self_test
(
int
verbose );
139
140
#endif
/* MBEDTLS_SELF_TEST */
141
142
#ifdef __cplusplus
143
}
144
#endif
145
146
#endif
/* arc4.h */
mbedtls_arc4_self_test
int mbedtls_arc4_self_test(int verbose)
Checkup routine.
mbedtls_arc4_free
void mbedtls_arc4_free(mbedtls_arc4_context *ctx)
Clear ARC4 context.
mbedtls_arc4_context
ARC4 context structure.
Definition:
arc4.h:57
mbedtls_arc4_context::m
unsigned char m[256]
Definition:
arc4.h:61
mbedtls_arc4_crypt
int mbedtls_arc4_crypt(mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output)
ARC4 cipher function.
mbedtls_arc4_context
struct mbedtls_arc4_context mbedtls_arc4_context
ARC4 context structure.
mbedtls_arc4_setup
void mbedtls_arc4_setup(mbedtls_arc4_context *ctx, const unsigned char *key, unsigned int keylen)
ARC4 key schedule.
mbedtls_arc4_context::x
int x
Definition:
arc4.h:59
config.h
Configuration options (set of defines)
mbedtls_arc4_init
void mbedtls_arc4_init(mbedtls_arc4_context *ctx)
Initialize ARC4 context.
mbedtls_arc4_context::y
int y
Definition:
arc4.h:60
Generated on Tue Jan 21 2020 12:33:50 for mbed TLS v2.16.3 by
1.8.17