1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 10:32:44 +01:00

sys/crypto: CTR add const

This commit is contained in:
Fabian Hüßler 2020-10-05 10:50:12 +02:00
parent a9295ae531
commit 8ded1b8c3c
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@
#include "crypto/helper.h"
#include "crypto/modes/ctr.h"
int cipher_encrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16],
int cipher_encrypt_ctr(const cipher_t *cipher, uint8_t nonce_counter[16],
uint8_t nonce_len, const uint8_t *input, size_t length,
uint8_t *output)
{
@ -49,7 +49,7 @@ int cipher_encrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16],
return offset;
}
int cipher_decrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16],
int cipher_decrypt_ctr(const cipher_t *cipher, uint8_t nonce_counter[16],
uint8_t nonce_len, const uint8_t *input, size_t length,
uint8_t *output)
{

View File

@ -44,7 +44,7 @@ extern "C" {
* @return Length of encrypted data on a successful encryption
* @return A negative error code if something went wrong
*/
int cipher_encrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16],
int cipher_encrypt_ctr(const cipher_t *cipher, uint8_t nonce_counter[16],
uint8_t nonce_len, const uint8_t *input, size_t length,
uint8_t *output);
@ -68,7 +68,7 @@ int cipher_encrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16],
* @return Length of decrypted data on a successful decryption
* @return A negative error code if something went wrong
*/
int cipher_decrypt_ctr(cipher_t *cipher, uint8_t nonce_counter[16],
int cipher_decrypt_ctr(const cipher_t *cipher, uint8_t nonce_counter[16],
uint8_t nonce_len, const uint8_t *input, size_t length,
uint8_t *output);