Fix formatting: fix some 'easy' > 80 length lines
This commit is contained in:
parent
9af723cee7
commit
b9e4e2c97a
60 changed files with 548 additions and 347 deletions
|
@ -96,7 +96,8 @@ static int aes_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
|||
unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
return aes_crypt_cbc( (aes_context *) ctx, operation, length, iv, input, output );
|
||||
return aes_crypt_cbc( (aes_context *) ctx, operation, length, iv, input,
|
||||
output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -109,11 +110,13 @@ static int aes_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
|||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
}
|
||||
|
||||
static int aes_crypt_cfb128_wrap( void *ctx, operation_t operation, size_t length,
|
||||
size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
static int aes_crypt_cfb128_wrap( void *ctx, operation_t operation,
|
||||
size_t length, size_t *iv_off, unsigned char *iv,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CFB)
|
||||
return aes_crypt_cfb128( (aes_context *) ctx, operation, length, iv_off, iv, input, output );
|
||||
return aes_crypt_cfb128( (aes_context *) ctx, operation, length, iv_off, iv,
|
||||
input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -127,8 +130,8 @@ static int aes_crypt_cfb128_wrap( void *ctx, operation_t operation, size_t lengt
|
|||
#endif /* POLARSSL_CIPHER_MODE_CFB */
|
||||
}
|
||||
|
||||
static int aes_crypt_ctr_wrap( void *ctx, size_t length,
|
||||
size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
static int aes_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off,
|
||||
unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CTR)
|
||||
|
@ -147,12 +150,14 @@ static int aes_crypt_ctr_wrap( void *ctx, size_t length,
|
|||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
}
|
||||
|
||||
static int aes_setkey_dec_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int aes_setkey_dec_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return aes_setkey_dec( (aes_context *) ctx, key, key_length );
|
||||
}
|
||||
|
||||
static int aes_setkey_enc_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int aes_setkey_enc_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return aes_setkey_enc( (aes_context *) ctx, key, key_length );
|
||||
}
|
||||
|
@ -319,7 +324,8 @@ const cipher_info_t aes_256_ctr_info = {
|
|||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
|
||||
#if defined(POLARSSL_GCM_C)
|
||||
static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return gcm_init( (gcm_context *) ctx, POLARSSL_CIPHER_ID_AES,
|
||||
key, key_length );
|
||||
|
@ -379,14 +385,17 @@ const cipher_info_t aes_256_gcm_info = {
|
|||
static int camellia_crypt_ecb_wrap( void *ctx, operation_t operation,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
return camellia_crypt_ecb( (camellia_context *) ctx, operation, input, output );
|
||||
return camellia_crypt_ecb( (camellia_context *) ctx, operation, input,
|
||||
output );
|
||||
}
|
||||
|
||||
static int camellia_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
||||
unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
static int camellia_crypt_cbc_wrap( void *ctx, operation_t operation,
|
||||
size_t length, unsigned char *iv,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
return camellia_crypt_cbc( (camellia_context *) ctx, operation, length, iv, input, output );
|
||||
return camellia_crypt_cbc( (camellia_context *) ctx, operation, length, iv,
|
||||
input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -399,11 +408,13 @@ static int camellia_crypt_cbc_wrap( void *ctx, operation_t operation, size_t len
|
|||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
}
|
||||
|
||||
static int camellia_crypt_cfb128_wrap( void *ctx, operation_t operation, size_t length,
|
||||
size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
static int camellia_crypt_cfb128_wrap( void *ctx, operation_t operation,
|
||||
size_t length, size_t *iv_off, unsigned char *iv,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CFB)
|
||||
return camellia_crypt_cfb128( (camellia_context *) ctx, operation, length, iv_off, iv, input, output );
|
||||
return camellia_crypt_cfb128( (camellia_context *) ctx, operation, length,
|
||||
iv_off, iv, input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -417,13 +428,13 @@ static int camellia_crypt_cfb128_wrap( void *ctx, operation_t operation, size_t
|
|||
#endif /* POLARSSL_CIPHER_MODE_CFB */
|
||||
}
|
||||
|
||||
static int camellia_crypt_ctr_wrap( void *ctx, size_t length,
|
||||
size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
static int camellia_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off,
|
||||
unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CTR)
|
||||
return camellia_crypt_ctr( (camellia_context *) ctx, length, nc_off, nonce_counter,
|
||||
stream_block, input, output );
|
||||
return camellia_crypt_ctr( (camellia_context *) ctx, length, nc_off,
|
||||
nonce_counter, stream_block, input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) length);
|
||||
|
@ -437,12 +448,14 @@ static int camellia_crypt_ctr_wrap( void *ctx, size_t length,
|
|||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
}
|
||||
|
||||
static int camellia_setkey_dec_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int camellia_setkey_dec_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return camellia_setkey_dec( (camellia_context *) ctx, key, key_length );
|
||||
}
|
||||
|
||||
static int camellia_setkey_enc_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int camellia_setkey_enc_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return camellia_setkey_enc( (camellia_context *) ctx, key, key_length );
|
||||
}
|
||||
|
@ -609,7 +622,8 @@ const cipher_info_t camellia_256_ctr_info = {
|
|||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
|
||||
#if defined(POLARSSL_GCM_C)
|
||||
static int gcm_camellia_setkey_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int gcm_camellia_setkey_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return gcm_init( (gcm_context *) ctx, POLARSSL_CIPHER_ID_CAMELLIA,
|
||||
key, key_length );
|
||||
|
@ -684,7 +698,8 @@ static int des_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
|||
unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
return des_crypt_cbc( (des_context *) ctx, operation, length, iv, input, output );
|
||||
return des_crypt_cbc( (des_context *) ctx, operation, length, iv, input,
|
||||
output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -701,7 +716,8 @@ static int des3_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
|||
unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
return des3_crypt_cbc( (des3_context *) ctx, operation, length, iv, input, output );
|
||||
return des3_crypt_cbc( (des3_context *) ctx, operation, length, iv, input,
|
||||
output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -714,8 +730,9 @@ static int des3_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
|||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
}
|
||||
|
||||
static int des_crypt_cfb128_wrap( void *ctx, operation_t operation, size_t length,
|
||||
size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
static int des_crypt_cfb128_wrap( void *ctx, operation_t operation,
|
||||
size_t length, size_t *iv_off, unsigned char *iv,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -728,8 +745,8 @@ static int des_crypt_cfb128_wrap( void *ctx, operation_t operation, size_t lengt
|
|||
return POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE;
|
||||
}
|
||||
|
||||
static int des_crypt_ctr_wrap( void *ctx, size_t length,
|
||||
size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
static int des_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off,
|
||||
unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
((void) ctx);
|
||||
|
@ -743,42 +760,48 @@ static int des_crypt_ctr_wrap( void *ctx, size_t length,
|
|||
return POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE;
|
||||
}
|
||||
|
||||
static int des_setkey_dec_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int des_setkey_dec_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
((void) key_length);
|
||||
|
||||
return des_setkey_dec( (des_context *) ctx, key );
|
||||
}
|
||||
|
||||
static int des_setkey_enc_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int des_setkey_enc_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
((void) key_length);
|
||||
|
||||
return des_setkey_enc( (des_context *) ctx, key );
|
||||
}
|
||||
|
||||
static int des3_set2key_dec_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int des3_set2key_dec_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
((void) key_length);
|
||||
|
||||
return des3_set2key_dec( (des3_context *) ctx, key );
|
||||
}
|
||||
|
||||
static int des3_set2key_enc_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int des3_set2key_enc_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
((void) key_length);
|
||||
|
||||
return des3_set2key_enc( (des3_context *) ctx, key );
|
||||
}
|
||||
|
||||
static int des3_set3key_dec_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int des3_set3key_dec_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
((void) key_length);
|
||||
|
||||
return des3_set3key_dec( (des3_context *) ctx, key );
|
||||
}
|
||||
|
||||
static int des3_set3key_enc_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int des3_set3key_enc_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
((void) key_length);
|
||||
|
||||
|
@ -916,14 +939,17 @@ const cipher_info_t des_ede3_cbc_info = {
|
|||
static int blowfish_crypt_ecb_wrap( void *ctx, operation_t operation,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
return blowfish_crypt_ecb( (blowfish_context *) ctx, operation, input, output );
|
||||
return blowfish_crypt_ecb( (blowfish_context *) ctx, operation, input,
|
||||
output );
|
||||
}
|
||||
|
||||
static int blowfish_crypt_cbc_wrap( void *ctx, operation_t operation, size_t length,
|
||||
unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
static int blowfish_crypt_cbc_wrap( void *ctx, operation_t operation,
|
||||
size_t length, unsigned char *iv, const unsigned char *input,
|
||||
unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
return blowfish_crypt_cbc( (blowfish_context *) ctx, operation, length, iv, input, output );
|
||||
return blowfish_crypt_cbc( (blowfish_context *) ctx, operation, length, iv,
|
||||
input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -936,11 +962,13 @@ static int blowfish_crypt_cbc_wrap( void *ctx, operation_t operation, size_t len
|
|||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
}
|
||||
|
||||
static int blowfish_crypt_cfb64_wrap( void *ctx, operation_t operation, size_t length,
|
||||
size_t *iv_off, unsigned char *iv, const unsigned char *input, unsigned char *output )
|
||||
static int blowfish_crypt_cfb64_wrap( void *ctx, operation_t operation,
|
||||
size_t length, size_t *iv_off, unsigned char *iv,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CFB)
|
||||
return blowfish_crypt_cfb64( (blowfish_context *) ctx, operation, length, iv_off, iv, input, output );
|
||||
return blowfish_crypt_cfb64( (blowfish_context *) ctx, operation, length,
|
||||
iv_off, iv, input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) operation);
|
||||
|
@ -954,13 +982,13 @@ static int blowfish_crypt_cfb64_wrap( void *ctx, operation_t operation, size_t l
|
|||
#endif /* POLARSSL_CIPHER_MODE_CFB */
|
||||
}
|
||||
|
||||
static int blowfish_crypt_ctr_wrap( void *ctx, size_t length,
|
||||
size_t *nc_off, unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
static int blowfish_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off,
|
||||
unsigned char *nonce_counter, unsigned char *stream_block,
|
||||
const unsigned char *input, unsigned char *output )
|
||||
{
|
||||
#if defined(POLARSSL_CIPHER_MODE_CTR)
|
||||
return blowfish_crypt_ctr( (blowfish_context *) ctx, length, nc_off, nonce_counter,
|
||||
stream_block, input, output );
|
||||
return blowfish_crypt_ctr( (blowfish_context *) ctx, length, nc_off,
|
||||
nonce_counter, stream_block, input, output );
|
||||
#else
|
||||
((void) ctx);
|
||||
((void) length);
|
||||
|
@ -974,7 +1002,8 @@ static int blowfish_crypt_ctr_wrap( void *ctx, size_t length,
|
|||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
}
|
||||
|
||||
static int blowfish_setkey_wrap( void *ctx, const unsigned char *key, unsigned int key_length )
|
||||
static int blowfish_setkey_wrap( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length )
|
||||
{
|
||||
return blowfish_setkey( (blowfish_context *) ctx, key, key_length );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue