aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_base/symkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/algo_base/symkey.h')
-rw-r--r--src/algo_base/symkey.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/algo_base/symkey.h b/src/algo_base/symkey.h
index 2ccc0b883..b47da8a69 100644
--- a/src/algo_base/symkey.h
+++ b/src/algo_base/symkey.h
@@ -25,9 +25,9 @@ class BOTAN_DLL OctetString
size_t length() const { return bits.size(); }
/**
- * @return this object as a SecureVector<byte>
+ * @return this object as a secure_vector<byte>
*/
- SecureVector<byte> bits_of() const { return bits; }
+ secure_vector<byte> bits_of() const { return bits; }
/**
* @return start of this string
@@ -80,9 +80,15 @@ class BOTAN_DLL OctetString
* Create a new OctetString
* @param in a bytestring
*/
- OctetString(const MemoryRegion<byte>& in);
+ OctetString(const secure_vector<byte>& in) : bits(in) {}
+
+ /**
+ * Create a new OctetString
+ * @param in a bytestring
+ */
+ OctetString(const std::vector<byte>& in) : bits(&in[0], &in[in.size()]) {}
private:
- SecureVector<byte> bits;
+ secure_vector<byte> bits;
};
/**