Add cipher_set_padding() (no effect yet)
Fix pattern in tests/.gitignore along the way.
diff --git a/include/polarssl/cipher.h b/include/polarssl/cipher.h
index 8aa8cb0..48fe97d 100644
--- a/include/polarssl/cipher.h
+++ b/include/polarssl/cipher.h
@@ -105,6 +105,10 @@
} cipher_mode_t;
typedef enum {
+ POLARSSL_PADDING_PKCS7 = 0, /**< PKCS7 padding (default) */
+} cipher_padding_t;
+
+typedef enum {
POLARSSL_OPERATION_NONE = -1,
POLARSSL_DECRYPT = 0,
POLARSSL_ENCRYPT,
@@ -399,6 +403,18 @@
const operation_t operation );
/**
+ * \brief Set padding mode, for cipher modes that use padding.
+ * (Default: PKCS7 padding.)
+ *
+ * \param ctx generic cipher context
+ * \param mode padding mode
+ *
+ * \returns 0 on success, POLARSSL_ERR_CIPHER_BAD_INPUT_DATA
+ * if parameters verification fails.
+ */
+int cipher_set_padding_mode( cipher_context_t *ctx, cipher_padding_t mode );
+
+/**
* \brief Reset the given context, setting the IV to iv
*
* \param ctx generic cipher context