From ae74d71df63abee42875d0f7bcef799808476b48 Mon Sep 17 00:00:00 2001 From: René Korthaus Date: Sun, 16 Oct 2016 14:04:04 +0200 Subject: Improve modes doxygen [ci skip] --- src/lib/modes/mode_pad/mode_pad.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/lib/modes/mode_pad') 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& 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); } -- cgit v1.2.3