aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pbkdf/pbkdf1/pbkdf1.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-18 21:26:38 +0000
committerlloyd <[email protected]>2014-01-18 21:26:38 +0000
commitb3bffeff3553f4b609afe634c8c8b56ca0a2384c (patch)
treee81f39a9f86fcefffdf9e7704dd0b7a7c337edb7 /src/lib/pbkdf/pbkdf1/pbkdf1.h
parentef465af87d61c0cfbba17b86a3e1cc48b90ab391 (diff)
More unique_ptr, also cleanup MGF1 usage
Diffstat (limited to 'src/lib/pbkdf/pbkdf1/pbkdf1.h')
-rw-r--r--src/lib/pbkdf/pbkdf1/pbkdf1.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/pbkdf/pbkdf1/pbkdf1.h b/src/lib/pbkdf/pbkdf1/pbkdf1.h
index 783b70ed9..2f14c3f32 100644
--- a/src/lib/pbkdf/pbkdf1/pbkdf1.h
+++ b/src/lib/pbkdf/pbkdf1/pbkdf1.h
@@ -10,6 +10,7 @@
#include <botan/pbkdf.h>
#include <botan/hash.h>
+#include <memory>
namespace Botan {
@@ -27,15 +28,6 @@ class BOTAN_DLL PKCS5_PBKDF1 : public PBKDF
*/
PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {}
- /**
- * Copy constructor
- * @param other the object to copy
- */
- PKCS5_PBKDF1(const PKCS5_PBKDF1& other) :
- PBKDF(), hash(other.hash->clone()) {}
-
- ~PKCS5_PBKDF1() { delete hash; }
-
std::string name() const
{
return "PBKDF1(" + hash->name() + ")";
@@ -53,7 +45,7 @@ class BOTAN_DLL PKCS5_PBKDF1 : public PBKDF
size_t iterations,
std::chrono::milliseconds msec) const override;
private:
- HashFunction* hash;
+ std::unique_ptr<HashFunction> hash;
};
}