aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/prf_x942/prf_x942.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/kdf/prf_x942/prf_x942.h')
-rw-r--r--src/lib/kdf/prf_x942/prf_x942.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/kdf/prf_x942/prf_x942.h b/src/lib/kdf/prf_x942/prf_x942.h
index ebf9839f5..4b93d5966 100644
--- a/src/lib/kdf/prf_x942/prf_x942.h
+++ b/src/lib/kdf/prf_x942/prf_x942.h
@@ -9,6 +9,7 @@
#define BOTAN_ANSI_X942_PRF_H_
#include <botan/kdf.h>
+#include <botan/asn1_oid.h>
namespace Botan {
@@ -18,7 +19,7 @@ namespace Botan {
class BOTAN_PUBLIC_API(2,0) X942_PRF final : public KDF
{
public:
- std::string name() const override { return "X9.42-PRF(" + m_key_wrap_oid + ")"; }
+ std::string name() const override;
KDF* clone() const override { return new X942_PRF(m_key_wrap_oid); }
@@ -27,9 +28,11 @@ class BOTAN_PUBLIC_API(2,0) X942_PRF final : public KDF
const uint8_t salt[], size_t salt_len,
const uint8_t label[], size_t label_len) const override;
- explicit X942_PRF(const std::string& oid);
+ explicit X942_PRF(const std::string& oid) : m_key_wrap_oid(OID::from_string(oid)) {}
+
+ explicit X942_PRF(const OID& oid) : m_key_wrap_oid(oid) {}
private:
- std::string m_key_wrap_oid;
+ OID m_key_wrap_oid;
};
}