mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 10:52:44 +01:00
sys/crypto: CTR add const
This commit is contained in:
parent
a9295ae531
commit
8ded1b8c3c
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user