Make cipher_set_padding() actually work

(Only one padding mode recognized yet.)
This commit is contained in:
Manuel Pégourié-Gonnard 2013-07-25 12:31:10 +02:00 committed by Paul Bakker
parent d5fdcaf9e5
commit ac56a1aec4
2 changed files with 32 additions and 16 deletions

View file

@ -202,6 +202,10 @@ typedef struct {
/** Operation that the context's key has been initialised for */
operation_t operation;
/** Padding functions to use, if relevant for cipher mode */
void (*add_padding)( unsigned char *output, size_t olen, size_t data_len );
int (*get_padding)( unsigned char *input, size_t ilen, size_t *data_len );
/** Buffer for data that hasn't been encrypted yet */
unsigned char unprocessed_data[POLARSSL_MAX_IV_LENGTH];