diff options
author | lloyd <[email protected]> | 2006-08-23 09:03:02 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-08-23 09:03:02 +0000 |
commit | 1f1f857f8c8ada3f4242f86cbf3d698853c752e0 (patch) | |
tree | 691e1eaaa1bd14585a35be84474c099983f91e0a /include | |
parent | 2b590d8d667ec29290291ceb6db81c82bb94a690 (diff) |
Make SymmetricKey and InitializationVector simple typedefs of OctetString;
since the RNG merger in 1.5.0, they have been effectively the same type
anyway.
Diffstat (limited to 'include')
-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; } |