diff options
Diffstat (limited to 'src/lib/kdf/kdf2/kdf2.h')
-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; }; } |