@@ -57,7 +57,8 @@ typedef struct {
5757
5858/*
5959 Applies PKCS7 padding to data.
60- Your data at the provided address does not change. A copy is created, to which the adding padding is applied.
60+ Your data at the provided address does not change.
61+ A copy is created, to which the adding padding is applied.
6162 WARNING: use only 0 < BLOCK_SIZE < 256
6263*/
6364PKCS7_Padding* addPadding (const void* const data, const uint64_t dataLength, const uint8_t BLOCK_SIZE);
@@ -78,7 +79,8 @@ typedef struct {
7879
7980/*
8081 Remove PKCS7 padding from data.
81- Your data at the provided address does not change. A copy is created, to which the removing padding is applied.
82+ Your data at the provided address does not change.
83+ A copy is created, to which the removing padding is applied.
8284*/
8385PKCS7_unPadding* removePadding(const void* const data, const uint64_t dataLength);
8486```
@@ -96,6 +98,19 @@ typedef enum {
9698 BLOCK_SIZE_CUSTOM_VALUE = 0 /* you can set your own constant to use */
9799} paddingBlockSize; /* can be used as third argument to the function addPadding() */
98100```
101+ When finished, use the following functions to free memory.
102+
103+ ``` C
104+ /*
105+ Frees the memory that was allocated for padding structure.
106+ */
107+ void freePaddingResult (PKCS7_Padding* puddingResult);
108+
109+ /*
110+ Frees the memory that was allocated for unpadding structure.
111+ * /
112+ void freeUnPaddingResult(PKCS7_unPadding* unPuddingResult);
113+ ```
99114
100115# Demonstration
101116
0 commit comments