diff options
Diffstat (limited to 'include/symkey.h')
-rw-r--r-- | include/symkey.h | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/include/symkey.h b/include/symkey.h index c3b5789d5..253c65ed6 100644 --- a/include/symkey.h +++ b/include/symkey.h @@ -35,6 +35,7 @@ class OctetString void change(const byte[], u32bit); void change(const MemoryRegion<byte>& in) { bits = in; } + OctetString(u32bit len) { change(len); } OctetString(const std::string& str = "") { change(str); } OctetString(const byte in[], u32bit len) { change(in, len); } OctetString(const MemoryRegion<byte>& in) { change(in); } @@ -51,30 +52,10 @@ OctetString operator+(const OctetString&, const OctetString&); OctetString operator^(const OctetString&, const OctetString&); /************************************************* -* Symmetric Key * +* Alternate Names * *************************************************/ -class SymmetricKey : public OctetString - { - public: - SymmetricKey(u32bit len) { change(len); } - SymmetricKey(const std::string& str = "") : OctetString(str) {} - SymmetricKey(const byte in[], u32bit l) : OctetString(in, l) {} - SymmetricKey(const MemoryRegion<byte>& in) : OctetString(in) {} - SymmetricKey(const OctetString& os) : OctetString(os) {} - }; - -/************************************************* -* Initialization Vector * -*************************************************/ -class InitializationVector : public OctetString - { - public: - InitializationVector(u32bit len) { change(len); } - InitializationVector(const std::string& str = "") : OctetString(str) {} - InitializationVector(const byte in[], u32bit l) : OctetString(in, l) {} - InitializationVector(const MemoryRegion<byte>& in) : OctetString(in) {} - InitializationVector(const OctetString& os) : OctetString(os) {} - }; +typedef OctetString SymmetricKey; +typedef OctetString InitializationVector; } |