diff options
author | lloyd <[email protected]> | 2014-01-18 21:26:38 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-18 21:26:38 +0000 |
commit | b3bffeff3553f4b609afe634c8c8b56ca0a2384c (patch) | |
tree | e81f39a9f86fcefffdf9e7704dd0b7a7c337edb7 /src/lib/kdf/kdf2 | |
parent | ef465af87d61c0cfbba17b86a3e1cc48b90ab391 (diff) |
More unique_ptr, also cleanup MGF1 usage
Diffstat (limited to 'src/lib/kdf/kdf2')
-rw-r--r-- | src/lib/kdf/kdf2/kdf2.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/kdf/kdf2/kdf2.h b/src/lib/kdf/kdf2/kdf2.h index e33939df9..60bbf5db1 100644 --- a/src/lib/kdf/kdf2/kdf2.h +++ b/src/lib/kdf/kdf2/kdf2.h @@ -10,6 +10,7 @@ #include <botan/kdf.h> #include <botan/hash.h> +#include <memory> namespace Botan { @@ -26,10 +27,8 @@ class BOTAN_DLL KDF2 : public KDF KDF* clone() const { return new KDF2(hash->clone()); } KDF2(HashFunction* h) : hash(h) {} - KDF2(const KDF2& other) : KDF(), hash(other.hash->clone()) {} - ~KDF2() { delete hash; } private: - HashFunction* hash; + std::unique_ptr<HashFunction> hash; }; } |