cbc.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include <stddef.h>
20 #include "crypto/ciphers.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
42 int cipher_encrypt_cbc(const cipher_t *cipher, uint8_t iv[16], const uint8_t *input,
43  size_t input_len, uint8_t *output);
44 
60 int cipher_decrypt_cbc(const cipher_t *cipher, uint8_t iv[16], const uint8_t *input,
61  size_t input_len, uint8_t *output);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
int cipher_decrypt_cbc(const cipher_t *cipher, uint8_t iv[16], const uint8_t *input, size_t input_len, uint8_t *output)
Decrypt encrypted data in cipher block chaining mode.
int cipher_encrypt_cbc(const cipher_t *cipher, uint8_t iv[16], const uint8_t *input, size_t input_len, uint8_t *output)
Encrypt data of arbitrary length in cipher block chaining mode.
Headers for the packet encryption class.
basic struct for using block ciphers contains the cipher interface and the context
Definition: ciphers.h:115