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/pbkdf/pbkdf2/pbkdf2.h | |
parent | ef465af87d61c0cfbba17b86a3e1cc48b90ab391 (diff) |
More unique_ptr, also cleanup MGF1 usage
Diffstat (limited to 'src/lib/pbkdf/pbkdf2/pbkdf2.h')
-rw-r--r-- | src/lib/pbkdf/pbkdf2/pbkdf2.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/pbkdf/pbkdf2/pbkdf2.h b/src/lib/pbkdf/pbkdf2/pbkdf2.h index 8bc271fcf..a88f2dd31 100644 --- a/src/lib/pbkdf/pbkdf2/pbkdf2.h +++ b/src/lib/pbkdf/pbkdf2/pbkdf2.h @@ -10,6 +10,7 @@ #include <botan/pbkdf.h> #include <botan/mac.h> +#include <memory> namespace Botan { @@ -38,16 +39,11 @@ class BOTAN_DLL PKCS5_PBKDF2 : public PBKDF /** * Create a PKCS #5 instance using the specified message auth code - * @param mac_fn the MAC to use + * @param mac_fn the MAC object to use as PRF */ PKCS5_PBKDF2(MessageAuthenticationCode* mac_fn) : mac(mac_fn) {} - - /** - * Destructor - */ - ~PKCS5_PBKDF2() { delete mac; } private: - MessageAuthenticationCode* mac; + std::unique_ptr<MessageAuthenticationCode> mac; }; } |