diff options
author | lloyd <[email protected]> | 2008-09-28 21:29:04 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 21:29:04 +0000 |
commit | b2243c339e9cb15a7af017eae8c6341354802613 (patch) | |
tree | fbecf5cd75e74e7a0d8a2a27d2f5b64281988a96 /src/pbe/pbes2 | |
parent | 0e0fb8fd1f0aa2906b7452ae011a2ebe2ad35389 (diff) |
Add missing PBE header and modinfo files
Diffstat (limited to 'src/pbe/pbes2')
-rw-r--r-- | src/pbe/pbes2/modinfo.txt | 10 | ||||
-rw-r--r-- | src/pbe/pbes2/pbes2.h | 45 |
2 files changed, 55 insertions, 0 deletions
diff --git a/src/pbe/pbes2/modinfo.txt b/src/pbe/pbes2/modinfo.txt new file mode 100644 index 000000000..ee421363a --- /dev/null +++ b/src/pbe/pbes2/modinfo.txt @@ -0,0 +1,10 @@ +realname "PKCS5 v2.0 PBE" + +define PBE_PKCS_V20 + +load_on auto + +<add> +pbes2.cpp +pbes2.h +</add> diff --git a/src/pbe/pbes2/pbes2.h b/src/pbe/pbes2/pbes2.h new file mode 100644 index 000000000..36ba67b01 --- /dev/null +++ b/src/pbe/pbes2/pbes2.h @@ -0,0 +1,45 @@ +/************************************************* +* PKCS #5 v2.0 PBE Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_PBE_PKCS_v20_H__ +#define BOTAN_PBE_PKCS_v20_H__ + +#include <botan/pbe.h> +#include <botan/pipe.h> +#include <botan/enums.h> + +namespace Botan { + +/************************************************* +* PKCS#5 v2.0 PBE * +*************************************************/ +class BOTAN_DLL PBE_PKCS5v20 : public PBE + { + public: + void write(const byte[], u32bit); + void start_msg(); + void end_msg(); + PBE_PKCS5v20(DataSource&); + PBE_PKCS5v20(const std::string&, const std::string&); + private: + void set_key(const std::string&); + void new_params(RandomNumberGenerator& rng); + MemoryVector<byte> encode_params() const; + void decode_params(DataSource&); + OID get_oid() const; + + void flush_pipe(bool); + bool known_cipher(const std::string&) const; + + const Cipher_Dir direction; + std::string digest, cipher, cipher_algo; + SecureVector<byte> salt, key, iv; + u32bit iterations, key_length; + Pipe pipe; + }; + +} + +#endif |