summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Cryptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Cryptor.h')
-rw-r--r--cpp/src/Ice/Cryptor.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/cpp/src/Ice/Cryptor.h b/cpp/src/Ice/Cryptor.h
new file mode 100644
index 00000000000..0d52b0bb69b
--- /dev/null
+++ b/cpp/src/Ice/Cryptor.h
@@ -0,0 +1,58 @@
+// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_CRYPTOR_H
+#define ICE_CRYPTOR_H
+
+#include <IceUtil/Shared.h>
+#include <Ice/Stream.h>
+#include <Ice/CryptKeyF.h>
+#include <Ice/CryptorF.h>
+#include <vector>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceUtil::Shared;
+using Ice::ByteSeq;
+
+typedef std::vector<CryptKeyPtr> CryptKeys;
+
+class Cryptor : public Shared
+{
+
+public:
+ Cryptor();
+ virtual ~Cryptor();
+
+ virtual const CryptKeyPtr getNewKey();
+
+ virtual const CryptKeyPtr getKey(const ByteSeq&);
+
+ virtual const CryptKeyPtr getOrCreateKey(const ByteSeq&);
+
+ virtual void encrypt(const CryptKeyPtr&, const ByteSeq&, ByteSeq&);
+
+ virtual void decrypt(const CryptKeyPtr&, const ByteSeq&, ByteSeq&);
+
+protected:
+ CryptKeys _cryptKeys;
+
+};
+
+}
+
+}
+
+#endif
+