diff options
Diffstat (limited to 'src/s2k')
-rw-r--r-- | src/s2k/pbkdf1/pbkdf1.h | 6 | ||||
-rw-r--r-- | src/s2k/pgps2k/pgp_s2k.h | 7 | ||||
-rw-r--r-- | src/s2k/s2k.h | 9 |
3 files changed, 15 insertions, 7 deletions
diff --git a/src/s2k/pbkdf1/pbkdf1.h b/src/s2k/pbkdf1/pbkdf1.h index 053a2dbe1..c0508d127 100644 --- a/src/s2k/pbkdf1/pbkdf1.h +++ b/src/s2k/pbkdf1/pbkdf1.h @@ -29,10 +29,14 @@ class BOTAN_DLL PKCS5_PBKDF1 : public S2K /** * Create a PKCS #5 instance using the specified hash function. - * @param hash a pointer to a hash function object to use + * @param hash_in pointer to a hash function object to use */ PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {} + /** + * Copy constructor + * @param other the object to copy + */ PKCS5_PBKDF1(const PKCS5_PBKDF1& other) : S2K(), hash(other.hash->clone()) {} diff --git a/src/s2k/pgps2k/pgp_s2k.h b/src/s2k/pgps2k/pgp_s2k.h index 7f25623f3..cfe9bf5d5 100644 --- a/src/s2k/pgps2k/pgp_s2k.h +++ b/src/s2k/pgps2k/pgp_s2k.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* OpenPGP S2K +/** +* OpenPGP's S2K */ class BOTAN_DLL OpenPGP_S2K : public S2K { @@ -27,6 +27,9 @@ class BOTAN_DLL OpenPGP_S2K : public S2K const byte salt[], u32bit salt_len, u32bit iterations) const; + /** + * @param hash_in the hash function to use + */ OpenPGP_S2K(HashFunction* hash_in) : hash(hash_in) {} ~OpenPGP_S2K() { delete hash; } private: diff --git a/src/s2k/s2k.h b/src/s2k/s2k.h index db59a5fe8..d6880db5d 100644 --- a/src/s2k/s2k.h +++ b/src/s2k/s2k.h @@ -12,21 +12,22 @@ namespace Botan { -/* -* S2K Interface +/** +* Base class for S2K (string to key) operations, which convert a +* password/passphrase into a key */ class BOTAN_DLL S2K { public: /** - * @return a new instance of this same algorithm + * @return new instance of this same algorithm */ virtual S2K* clone() const = 0; /** * Get the algorithm name. - * @return the name of this S2K algorithm + * @return name of this S2K algorithm */ virtual std::string name() const = 0; |