mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
- Added const-correctness to main codebase
This commit is contained in:
@ -278,7 +278,7 @@ static const signed char transposes[2][20] =
|
||||
} \
|
||||
}
|
||||
|
||||
static void camellia_feistel(uint32_t x[2], uint32_t k[2], uint32_t z[2])
|
||||
static void camellia_feistel(const uint32_t x[2], const uint32_t k[2], uint32_t z[2])
|
||||
{
|
||||
uint32_t I0, I1;
|
||||
I0 = x[0] ^ k[0];
|
||||
@ -305,7 +305,7 @@ static void camellia_feistel(uint32_t x[2], uint32_t k[2], uint32_t z[2])
|
||||
/*
|
||||
* Camellia key schedule (encryption)
|
||||
*/
|
||||
int camellia_setkey_enc( camellia_context *ctx, unsigned char *key, int keysize )
|
||||
int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, int keysize )
|
||||
{
|
||||
int i, idx;
|
||||
uint32_t *RK;
|
||||
@ -408,7 +408,7 @@ int camellia_setkey_enc( camellia_context *ctx, unsigned char *key, int keysize
|
||||
/*
|
||||
* Camellia key schedule (decryption)
|
||||
*/
|
||||
int camellia_setkey_dec( camellia_context *ctx, unsigned char *key, int keysize )
|
||||
int camellia_setkey_dec( camellia_context *ctx, const unsigned char *key, int keysize )
|
||||
{
|
||||
int i, idx;
|
||||
camellia_context cty;
|
||||
@ -460,7 +460,7 @@ int camellia_setkey_dec( camellia_context *ctx, unsigned char *key, int keysize
|
||||
*/
|
||||
void camellia_crypt_ecb( camellia_context *ctx,
|
||||
int mode,
|
||||
unsigned char input[16],
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] )
|
||||
{
|
||||
int NR;
|
||||
@ -522,7 +522,7 @@ void camellia_crypt_cbc( camellia_context *ctx,
|
||||
int mode,
|
||||
int length,
|
||||
unsigned char iv[16],
|
||||
unsigned char *input,
|
||||
const unsigned char *input,
|
||||
unsigned char *output )
|
||||
{
|
||||
int i;
|
||||
@ -570,7 +570,7 @@ void camellia_crypt_cfb128( camellia_context *ctx,
|
||||
int length,
|
||||
int *iv_off,
|
||||
unsigned char iv[16],
|
||||
unsigned char *input,
|
||||
const unsigned char *input,
|
||||
unsigned char *output )
|
||||
{
|
||||
int c, n = *iv_off;
|
||||
|
Reference in New Issue
Block a user