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 
9 #pragma once
10 
22 #include <stddef.h>
23 #include "crypto/ciphers.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
45 int cipher_encrypt_cbc(const cipher_t *cipher, uint8_t iv[16], const uint8_t *input,
46  size_t input_len, uint8_t *output);
47 
63 int cipher_decrypt_cbc(const cipher_t *cipher, uint8_t iv[16], const uint8_t *input,
64  size_t input_len, uint8_t *output);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
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:118