diff options
Diffstat (limited to 'cpp/src/Ice/CryptKey.h')
-rw-r--r-- | cpp/src/Ice/CryptKey.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/cpp/src/Ice/CryptKey.h b/cpp/src/Ice/CryptKey.h new file mode 100644 index 00000000000..f7d9660c37d --- /dev/null +++ b/cpp/src/Ice/CryptKey.h @@ -0,0 +1,63 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_CRYPT_KEY_H
+#define ICE_CRYPT_KEY_H
+
+#include <IceUtil/Shared.h>
+#include <Ice/Stream.h>
+#include <Ice/CryptKeyF.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceUtil::Shared;
+using Ice::ByteSeq;
+
+class CryptKey : public Shared
+{
+
+public:
+ CryptKey(const ByteSeq&);
+ virtual ~CryptKey();
+
+ virtual const ByteSeq& toByteSeq() const;
+
+ //
+ // Compare CryptKeys for sorting purposes
+ //
+ virtual bool operator==(const CryptKey&) const;
+ virtual bool operator!=(const CryptKey&) const;
+ virtual bool operator<(const CryptKey&) const;
+
+protected:
+ ByteSeq _keyBytes;
+
+};
+
+inline bool operator==(const CryptKey& cryptKey, const CryptKeyPtr& cryptKeyPtr)
+{
+ return (cryptKey == *(cryptKeyPtr.get()));
+}
+
+inline bool operator==(const CryptKeyPtr& cryptKeyPtr, const CryptKey& cryptKey)
+{
+ return (cryptKey == *(cryptKeyPtr.get()));
+}
+
+}
+
+}
+
+#endif
+
|