XenevaOS
Loading...
Searching...
No Matches
block_cipher_internal.h
Go to the documentation of this file.
1
7/*
8 * Copyright The Mbed TLS Contributors
9 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10 */
11#ifndef MBEDTLS_BLOCK_CIPHER_INTERNAL_H
12#define MBEDTLS_BLOCK_CIPHER_INTERNAL_H
13
14#include "mbedtls/build_info.h"
15
16#include "mbedtls/cipher.h"
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
30static inline void mbedtls_block_cipher_init(mbedtls_block_cipher_context_t *ctx)
31{
32 memset(ctx, 0, sizeof(*ctx));
33}
34
50 mbedtls_cipher_id_t cipher_id);
51
68 const unsigned char *key,
69 unsigned key_bitlen);
70
86 const unsigned char input[16],
87 unsigned char output[16]);
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif /* MBEDTLS_BLOCK_CIPHER_INTERNAL_H */
Internal abstraction layer.
int mbedtls_block_cipher_setkey(mbedtls_block_cipher_context_t *ctx, const unsigned char *key, unsigned key_bitlen)
Set the key into the context.
int mbedtls_block_cipher_setup(mbedtls_block_cipher_context_t *ctx, mbedtls_cipher_id_t cipher_id)
Set the block cipher to use with this context. This must be called after mbedtls_block_cipher_init().
void mbedtls_block_cipher_free(mbedtls_block_cipher_context_t *ctx)
Clear the context.
int mbedtls_block_cipher_encrypt(mbedtls_block_cipher_context_t *ctx, const unsigned char input[16], unsigned char output[16])
Encrypt one block (16 bytes) with the configured key.
This file contains an abstraction interface for use with the cipher primitives provided by the librar...
mbedtls_cipher_id_t
Supported cipher types.
Definition cipher.h:66
void memset(void)
Build-time configuration info.
Definition block_cipher.h:52
struct VirtioInputEvent * input
Definition virtiokbd.c:46