ecb.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_ECB_H
21 #define CRYPTO_MODES_ECB_H
22 
23 #include "crypto/ciphers.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
45 int cipher_encrypt_ecb(const cipher_t *cipher, const uint8_t *input,
46  size_t length, uint8_t *output);
47 
48 
62 int cipher_decrypt_ecb(const cipher_t *cipher, const uint8_t *input,
63  size_t length, uint8_t *output);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif /* CRYPTO_MODES_ECB_H */
70 
cipher_t
basic struct for using block ciphers contains the cipher interface and the context
Definition: ciphers.h:104
cipher_encrypt_ecb
int cipher_encrypt_ecb(const cipher_t *cipher, const uint8_t *input, size_t length, uint8_t *output)
Encrypt data of arbitrary length in ecb mode.
ciphers.h
Headers for the packet encryption class. They are used to encrypt single packets.
cipher_decrypt_ecb
int cipher_decrypt_ecb(const cipher_t *cipher, const uint8_t *input, size_t length, uint8_t *output)
Decrypts data of arbitrary length in ecb mode.