1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Restructured cipher_set_padding_mode() to use switch statement

This commit is contained in:
Paul Bakker
2013-08-14 12:04:26 +02:00
parent ebdc413f44
commit 1a45d91cf2
2 changed files with 19 additions and 21 deletions

View File

@ -417,8 +417,10 @@ int cipher_setkey( cipher_context_t *ctx, const unsigned char *key, int key_leng
* \param ctx generic cipher context
* \param mode padding mode
*
* \returns 0 on success, POLARSSL_ERR_CIPHER_BAD_INPUT_DATA
* if parameters verification fails.
* \returns 0 on success, POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE
* if selected padding mode is not supported, or
* POLARSSL_ERR_CIPHER_BAD_INPUT_DATA if the cipher mode
* does not support padding.
*/
int cipher_set_padding_mode( cipher_context_t *ctx, cipher_padding_t mode );