summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Cryptor.h
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2002-01-21 18:25:23 +0000
committerAnthony Neal <aneal@zeroc.com>2002-01-21 18:25:23 +0000
commitaf55fcdcfb0857a3516f30fb61176ffe9bc31110 (patch)
treed92b8bd808ab3f6420e2733295024d1fbf6a1d7b /cpp/src/Ice/Cryptor.h
parentadding server; removing wstring (diff)
downloadice-af55fcdcfb0857a3516f30fb61176ffe9bc31110.tar.bz2
ice-af55fcdcfb0857a3516f30fb61176ffe9bc31110.tar.xz
ice-af55fcdcfb0857a3516f30fb61176ffe9bc31110.zip
Update of SUDP (Secure UDP) related code. SUDP is still not active, but
compiles as is under Linux and Windows.
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
+