libaaruformat
1.0
Aaru Data Preservation Suite - Format Library
Toggle main menu visibility
Loading...
Searching...
No Matches
aes128.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Aaru Data Preservation Suite.
3
* Copyright (c) 2019-2026 Natalia Portillo.
4
*
5
* This library is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU Lesser General Public License as
7
* published by the Free Software Foundation; version 2.1 of the License.
8
*
9
* This library is distributed in the hope that it will be useful, but
10
* WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, see
16
* <https://www.gnu.org/licenses/>.
17
*
18
* AES-128 CBC encrypt/decrypt implementation.
19
* Derived from public domain tiny-AES-c by kokke.
20
*/
21
22
#ifndef LIBAARUFORMAT_AES128_H
23
#define LIBAARUFORMAT_AES128_H
24
25
#include <stdint.h>
26
27
#ifdef __cplusplus
28
extern
"C"
29
{
30
#endif
31
40
void
aes128_cbc_encrypt
(
const
uint8_t key[16],
const
uint8_t iv[16], uint8_t *data, uint32_t length);
41
50
void
aes128_cbc_decrypt
(
const
uint8_t key[16],
const
uint8_t iv[16], uint8_t *data, uint32_t length);
51
52
#ifdef __cplusplus
53
}
54
#endif
55
56
#endif
/* LIBAARUFORMAT_AES128_H */
aes128_cbc_decrypt
void aes128_cbc_decrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
AES-128 CBC decrypt data in-place.
Definition
aes128.c:290
aes128_cbc_encrypt
void aes128_cbc_encrypt(const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length)
AES-128 CBC encrypt data in-place.
Definition
aes128.c:274
src
lib
aes128.h
Generated by
1.18.0