mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add cipher_set_padding() (no effect yet)
Fix pattern in tests/.gitignore along the way.
This commit is contained in:
committed by
Paul Bakker
parent
0f2f0bfc87
commit
d5fdcaf9e5
@ -368,6 +368,18 @@ int cipher_setkey( cipher_context_t *ctx, const unsigned char *key,
|
||||
return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
int cipher_set_padding_mode( cipher_context_t *ctx, cipher_padding_t mode )
|
||||
{
|
||||
if( NULL == ctx ||
|
||||
POLARSSL_MODE_CBC != ctx->cipher_info->mode ||
|
||||
POLARSSL_PADDING_PKCS7 != mode )
|
||||
{
|
||||
return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cipher_reset( cipher_context_t *ctx, const unsigned char *iv )
|
||||
{
|
||||
if( NULL == ctx || NULL == ctx->cipher_info || NULL == iv )
|
||||
|
Reference in New Issue
Block a user