diff options
author | lloyd <[email protected]> | 2010-06-16 03:54:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-16 03:54:59 +0000 |
commit | aa0c77746be858f094debf0d96e87c02908e8dc3 (patch) | |
tree | 98d66a941f476ad035ffc18138998b4bc1dfb8b9 /src/pbe | |
parent | 85780f6bbe02d7abd573f5b47bf9e79c611f5022 (diff) |
Yet more Doxygen comments
Diffstat (limited to 'src/pbe')
-rw-r--r-- | src/pbe/pbes2/pbes2.cpp | 24 | ||||
-rw-r--r-- | src/pbe/pbes2/pbes2.h | 19 |
2 files changed, 28 insertions, 15 deletions
diff --git a/src/pbe/pbes2/pbes2.cpp b/src/pbe/pbes2/pbes2.cpp index 4a28193e1..1ac16af8d 100644 --- a/src/pbe/pbes2/pbes2.cpp +++ b/src/pbe/pbes2/pbes2.cpp @@ -21,7 +21,7 @@ namespace Botan { -/** +/* * Encrypt some bytes using PBES2 */ void PBE_PKCS5v20::write(const byte input[], u32bit length) @@ -35,7 +35,7 @@ void PBE_PKCS5v20::write(const byte input[], u32bit length) } } -/** +/* * Start encrypting with PBES2 */ void PBE_PKCS5v20::start_msg() @@ -54,7 +54,7 @@ void PBE_PKCS5v20::start_msg() pipe.set_default_msg(pipe.default_msg() + 1); } -/** +/* * Finish encrypting with PBES2 */ void PBE_PKCS5v20::end_msg() @@ -64,7 +64,7 @@ void PBE_PKCS5v20::end_msg() pipe.reset(); } -/** +/* * Flush the pipe */ void PBE_PKCS5v20::flush_pipe(bool safe_to_skip) @@ -80,7 +80,7 @@ void PBE_PKCS5v20::flush_pipe(bool safe_to_skip) } } -/** +/* * Set the passphrase to use */ void PBE_PKCS5v20::set_key(const std::string& passphrase) @@ -92,7 +92,7 @@ void PBE_PKCS5v20::set_key(const std::string& passphrase) iterations).bits_of(); } -/** +/* * Create a new set of PBES2 parameters */ void PBE_PKCS5v20::new_params(RandomNumberGenerator& rng) @@ -107,7 +107,7 @@ void PBE_PKCS5v20::new_params(RandomNumberGenerator& rng) rng.randomize(iv, iv.size()); } -/** +/* * Encode PKCS#5 PBES2 parameters */ MemoryVector<byte> PBE_PKCS5v20::encode_params() const @@ -136,7 +136,7 @@ MemoryVector<byte> PBE_PKCS5v20::encode_params() const .get_contents(); } -/** +/* * Decode PKCS#5 PBES2 parameters */ void PBE_PKCS5v20::decode_params(DataSource& source) @@ -187,7 +187,7 @@ void PBE_PKCS5v20::decode_params(DataSource& source) throw Decoding_Error("PBE-PKCS5 v2.0: Encoded salt is too small"); } -/** +/* * Return an OID for PBES2 */ OID PBE_PKCS5v20::get_oid() const @@ -195,7 +195,7 @@ OID PBE_PKCS5v20::get_oid() const return OIDS::lookup("PBE-PKCS5v20"); } -/** +/* * Check if this is a known PBES2 cipher */ bool PBE_PKCS5v20::known_cipher(const std::string& algo) @@ -207,7 +207,7 @@ bool PBE_PKCS5v20::known_cipher(const std::string& algo) return false; } -/** +/* * PKCS#5 v2.0 PBE Constructor */ PBE_PKCS5v20::PBE_PKCS5v20(BlockCipher* cipher, @@ -220,7 +220,7 @@ PBE_PKCS5v20::PBE_PKCS5v20(BlockCipher* cipher, throw Invalid_Argument("PBE-PKCS5 v2.0: Invalid digest " + digest->name()); } -/** +/* * PKCS#5 v2.0 PBE Constructor */ PBE_PKCS5v20::PBE_PKCS5v20(DataSource& params) : direction(DECRYPTION) diff --git a/src/pbe/pbes2/pbes2.h b/src/pbe/pbes2/pbes2.h index e5182af78..f24d572d0 100644 --- a/src/pbe/pbes2/pbes2.h +++ b/src/pbe/pbes2/pbes2.h @@ -21,14 +21,27 @@ namespace Botan { class BOTAN_DLL PBE_PKCS5v20 : public PBE { public: - static bool known_cipher(const std::string&); + /** + * @param cipher names a block cipher + * @return true iff PKCS #5 knows how to use this cipher + */ + static bool known_cipher(const std::string& cipher); void write(const byte[], u32bit); void start_msg(); void end_msg(); - PBE_PKCS5v20(DataSource&); - PBE_PKCS5v20(BlockCipher*, HashFunction*); + /** + * Load a PKCS #5 v2.0 encrypted stream + * @param input is the input source + */ + PBE_PKCS5v20(DataSource& input); + + /** + * @param cipher the block cipher to use + * @param hash the hash function to use + */ + PBE_PKCS5v20(BlockCipher* cipher, HashFunction* hash); ~PBE_PKCS5v20(); private: |