1 /*********************************************************************************************************************************** 2 Block Cipher Header 3 ***********************************************************************************************************************************/ 4 #ifndef COMMON_CRYPTO_CIPHERBLOCK_H 5 #define COMMON_CRYPTO_CIPHERBLOCK_H 6 7 #include "common/io/filter/group.h" 8 #include "common/crypto/common.h" 9 10 /*********************************************************************************************************************************** 11 Filter type constant 12 ***********************************************************************************************************************************/ 13 #define CIPHER_BLOCK_FILTER_TYPE "cipherBlock" 14 STRING_DECLARE(CIPHER_BLOCK_FILTER_TYPE_STR); 15 16 /*********************************************************************************************************************************** 17 Constructors 18 ***********************************************************************************************************************************/ 19 IoFilter *cipherBlockNew(CipherMode mode, CipherType cipherType, const Buffer *pass, const String *digestName); 20 IoFilter *cipherBlockNewVar(const VariantList *paramList); 21 22 /*********************************************************************************************************************************** 23 Helper functions 24 ***********************************************************************************************************************************/ 25 // Add a block cipher to an io object 26 IoFilterGroup *cipherBlockFilterGroupAdd(IoFilterGroup *filterGroup, CipherType type, CipherMode mode, const String *pass); 27 28 #endif 29