Mbed TLS v2.28.8
include
mbedtls
arc4.h
Go to the documentation of this file.
1
9
/*
10
* Copyright The Mbed TLS Contributors
11
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
12
*
13
*/
14
#ifndef MBEDTLS_ARC4_H
15
#define MBEDTLS_ARC4_H
16
17
#if !defined(MBEDTLS_CONFIG_FILE)
18
#include "
mbedtls/config.h
"
19
#else
20
#include MBEDTLS_CONFIG_FILE
21
#endif
22
23
#include <stddef.h>
24
25
/* MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED is deprecated and should not be used. */
27
#define MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED -0x0019
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
33
#if !defined(MBEDTLS_ARC4_ALT)
34
// Regular implementation
35
//
36
44
typedef
struct
mbedtls_arc4_context
{
45
int
x
;
46
int
y
;
47
unsigned
char
m
[256];
48
}
49
mbedtls_arc4_context
;
50
51
#else
/* MBEDTLS_ARC4_ALT */
52
#include "arc4_alt.h"
53
#endif
/* MBEDTLS_ARC4_ALT */
54
65
void
mbedtls_arc4_init
(
mbedtls_arc4_context
*ctx);
66
77
void
mbedtls_arc4_free
(
mbedtls_arc4_context
*ctx);
78
91
void
mbedtls_arc4_setup
(
mbedtls_arc4_context
*ctx,
const
unsigned
char
*key,
92
unsigned
int
keylen);
93
109
int
mbedtls_arc4_crypt
(
mbedtls_arc4_context
*ctx,
size_t
length,
const
unsigned
char
*input,
110
unsigned
char
*output);
111
112
#if defined(MBEDTLS_SELF_TEST)
113
124
int
mbedtls_arc4_self_test
(
int
verbose);
125
126
#endif
/* MBEDTLS_SELF_TEST */
127
128
#ifdef __cplusplus
129
}
130
#endif
131
132
#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:44
mbedtls_arc4_context::m
unsigned char m[256]
Definition:
arc4.h:47
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:45
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:46
Generated on Wed Apr 24 2024 20:07:29 for Mbed TLS v2.28.8 by
1.8.17