/************************************************* * 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 #include #include 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 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 salt, key, iv; u32bit iterations, key_length; Pipe pipe; }; } #endif