aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/mode_pad
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-10-16 14:04:04 +0200
committerRenĂ© Korthaus <[email protected]>2016-10-19 09:13:23 +0200
commitae74d71df63abee42875d0f7bcef799808476b48 (patch)
tree9debca0e738665ef94a5a744a749b0ea1c6d2625 /src/lib/modes/mode_pad
parentfd741ac1ef348cc3f843fbf22aca698f86e87dbf (diff)
Improve modes doxygen [ci skip]
Diffstat (limited to 'src/lib/modes/mode_pad')
-rw-r--r--src/lib/modes/mode_pad/mode_pad.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/modes/mode_pad/mode_pad.h b/src/lib/modes/mode_pad/mode_pad.h
index bc2b7c132..ab0941f54 100644
--- a/src/lib/modes/mode_pad/mode_pad.h
+++ b/src/lib/modes/mode_pad/mode_pad.h
@@ -25,13 +25,20 @@ namespace Botan {
class BOTAN_DLL BlockCipherModePaddingMethod
{
public:
+ /**
+ * Add padding bytes to buffer.
+ * @param buffer data to pad
+ * @param size of the final block in bytes
+ * @param size of each block in bytes
+ */
virtual void add_padding(secure_vector<byte>& buffer,
size_t final_block_bytes,
size_t block_size) const = 0;
/**
+ * Remove padding bytes from block
* @param block the last block
- * @param size the of the block
+ * @param size the size of the block in bytes
* @return number of padding bytes
*/
virtual size_t unpad(const byte block[],
@@ -120,6 +127,10 @@ class BOTAN_DLL Null_Padding final : public BlockCipherModePaddingMethod
std::string name() const override { return "NoPadding"; }
};
+/**
+* Get a block cipher padding mode by name (eg "NoPadding" or "PKCS7")
+* @param algo_spec block cipher padding mode name
+*/
BOTAN_DLL BlockCipherModePaddingMethod* get_bc_pad(const std::string& algo_spec);
}