aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mode_pad.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/include/mode_pad.h b/include/mode_pad.h
deleted file mode 100644
index 4041efcdc..000000000
--- a/include/mode_pad.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************
-* CBC Padding Methods Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_CBC_PADDING_H__
-#define BOTAN_CBC_PADDING_H__
-
-#include <botan/base.h>
-#include <string>
-
-namespace Botan {
-
-/*************************************************
-* Block Cipher Mode Padding Method *
-*************************************************/
-class BOTAN_DLL BlockCipherModePaddingMethod
- {
- public:
- virtual void pad(byte[], u32bit, u32bit) const = 0;
- virtual u32bit unpad(const byte[], u32bit) const = 0;
- virtual u32bit pad_bytes(u32bit, u32bit) const;
- virtual bool valid_blocksize(u32bit) const = 0;
- virtual std::string name() const = 0;
- virtual ~BlockCipherModePaddingMethod() {}
- };
-
-/*************************************************
-* PKCS#7 Padding *
-*************************************************/
-class BOTAN_DLL PKCS7_Padding : public BlockCipherModePaddingMethod
- {
- public:
- void pad(byte[], u32bit, u32bit) const;
- u32bit unpad(const byte[], u32bit) const;
- bool valid_blocksize(u32bit) const;
- std::string name() const { return "PKCS7"; }
- };
-
-/*************************************************
-* ANSI X9.23 Padding *
-*************************************************/
-class BOTAN_DLL ANSI_X923_Padding : public BlockCipherModePaddingMethod
- {
- public:
- void pad(byte[], u32bit, u32bit) const;
- u32bit unpad(const byte[], u32bit) const;
- bool valid_blocksize(u32bit) const;
- std::string name() const { return "X9.23"; }
- };
-
-/*************************************************
-* One And Zeros Padding *
-*************************************************/
-class BOTAN_DLL OneAndZeros_Padding : public BlockCipherModePaddingMethod
- {
- public:
- void pad(byte[], u32bit, u32bit) const;
- u32bit unpad(const byte[], u32bit) const;
- bool valid_blocksize(u32bit) const;
- std::string name() const { return "OneAndZeros"; }
- };
-
-/*************************************************
-* Null Padding *
-*************************************************/
-class BOTAN_DLL Null_Padding : public BlockCipherModePaddingMethod
- {
- public:
- void pad(byte[], u32bit, u32bit) const { return; }
- u32bit unpad(const byte[], u32bit size) const { return size; }
- u32bit pad_bytes(u32bit, u32bit) const { return 0; }
- bool valid_blocksize(u32bit) const { return true; }
- std::string name() const { return "NoPadding"; }
- };
-
-}
-
-#endif