mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-10 23:35:37 +00:00
Wrap lines at 80 columns
This commit is contained in:
parent
ffdf28851d
commit
5f28999433
|
@ -1392,7 +1392,8 @@ int mbedtls_cipher_auth_encrypt( mbedtls_cipher_context_t *ctx,
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_CHACHAPOLY_C */
|
#endif /* MBEDTLS_CHACHAPOLY_C */
|
||||||
#if defined(MBEDTLS_NIST_KW_C)
|
#if defined(MBEDTLS_NIST_KW_C)
|
||||||
if( MBEDTLS_MODE_KW == ctx->cipher_info->mode || MBEDTLS_MODE_KWP == ctx->cipher_info->mode )
|
if( MBEDTLS_MODE_KW == ctx->cipher_info->mode ||
|
||||||
|
MBEDTLS_MODE_KWP == ctx->cipher_info->mode )
|
||||||
{
|
{
|
||||||
mbedtls_nist_kw_mode_t mode = ( MBEDTLS_MODE_KW == ctx->cipher_info->mode ) ?
|
mbedtls_nist_kw_mode_t mode = ( MBEDTLS_MODE_KW == ctx->cipher_info->mode ) ?
|
||||||
MBEDTLS_KW_MODE_KW : MBEDTLS_KW_MODE_KWP;
|
MBEDTLS_KW_MODE_KW : MBEDTLS_KW_MODE_KWP;
|
||||||
|
@ -1516,7 +1517,8 @@ int mbedtls_cipher_auth_decrypt( mbedtls_cipher_context_t *ctx,
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_CHACHAPOLY_C */
|
#endif /* MBEDTLS_CHACHAPOLY_C */
|
||||||
#if defined(MBEDTLS_NIST_KW_C)
|
#if defined(MBEDTLS_NIST_KW_C)
|
||||||
if( MBEDTLS_MODE_KW == ctx->cipher_info->mode || MBEDTLS_MODE_KWP == ctx->cipher_info->mode )
|
if( MBEDTLS_MODE_KW == ctx->cipher_info->mode ||
|
||||||
|
MBEDTLS_MODE_KWP == ctx->cipher_info->mode )
|
||||||
{
|
{
|
||||||
mbedtls_nist_kw_mode_t mode = ( MBEDTLS_MODE_KW == ctx->cipher_info->mode ) ?
|
mbedtls_nist_kw_mode_t mode = ( MBEDTLS_MODE_KW == ctx->cipher_info->mode ) ?
|
||||||
MBEDTLS_KW_MODE_KW : MBEDTLS_KW_MODE_KWP;
|
MBEDTLS_KW_MODE_KW : MBEDTLS_KW_MODE_KWP;
|
||||||
|
|
|
@ -2143,15 +2143,15 @@ static void kw_ctx_free( void *ctx )
|
||||||
static int kw_aes_setkey_wrap( void *ctx, const unsigned char *key,
|
static int kw_aes_setkey_wrap( void *ctx, const unsigned char *key,
|
||||||
unsigned int key_bitlen )
|
unsigned int key_bitlen )
|
||||||
{
|
{
|
||||||
return mbedtls_nist_kw_setkey( (mbedtls_nist_kw_context *) ctx, MBEDTLS_CIPHER_ID_AES,
|
return mbedtls_nist_kw_setkey( (mbedtls_nist_kw_context *) ctx,
|
||||||
key, key_bitlen, 1 );
|
MBEDTLS_CIPHER_ID_AES, key, key_bitlen, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int kw_aes_setkey_unwrap( void *ctx, const unsigned char *key,
|
static int kw_aes_setkey_unwrap( void *ctx, const unsigned char *key,
|
||||||
unsigned int key_bitlen )
|
unsigned int key_bitlen )
|
||||||
{
|
{
|
||||||
return mbedtls_nist_kw_setkey( (mbedtls_nist_kw_context *) ctx, MBEDTLS_CIPHER_ID_AES,
|
return mbedtls_nist_kw_setkey( (mbedtls_nist_kw_context *) ctx,
|
||||||
key, key_bitlen, 0 );
|
MBEDTLS_CIPHER_ID_AES, key, key_bitlen, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static const mbedtls_cipher_base_t kw_aes_info = {
|
static const mbedtls_cipher_base_t kw_aes_info = {
|
||||||
|
|
Loading…
Reference in a new issue