cbc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef CRYPTO_MODES_CBC_H
21 #define CRYPTO_MODES_CBC_H
22 
23 #include <stddef.h>
24 #include "crypto/ciphers.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
46 int cipher_encrypt_cbc(cipher_t *cipher, uint8_t iv[16], const uint8_t *input,
47  size_t input_len, uint8_t *output);
48 
49 
65 int cipher_decrypt_cbc(cipher_t *cipher, uint8_t iv[16], const uint8_t *input,
66  size_t input_len, uint8_t *output);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* CRYPTO_MODES_CBC_H */
73 
basic struct for using block ciphers contains the cipher interface and the context ...
Definition: ciphers.h:111
int cipher_decrypt_cbc(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.
Headers for the packet encryption class.
int cipher_encrypt_cbc(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.