summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/TLS/PrivateKey.h')
-rw-r--r--Swiften/TLS/PrivateKey.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Swiften/TLS/PrivateKey.h b/Swiften/TLS/PrivateKey.h
new file mode 100644
index 0000000..332fc48
--- /dev/null
+++ b/Swiften/TLS/PrivateKey.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <memory>
+
+#include <boost/optional.hpp>
+
+#include <Swiften/Base/SafeByteArray.h>
+#include <Swiften/TLS/PrivateKey.h>
+
+namespace Swift {
+
+class PrivateKey {
+public:
+ using ref = std::shared_ptr<PrivateKey>;
+
+public:
+ PrivateKey(const SafeByteArray& data, boost::optional<SafeByteArray> password = boost::optional<SafeByteArray>());
+
+ const SafeByteArray& getData() const;
+ const boost::optional<SafeByteArray>& getPassword() const;
+
+private:
+ SafeByteArray data_;
+ boost::optional<SafeByteArray> password_;
+};
+
+}