SmartFoxServer 2X C++ API
CryptoKey.h
1 // ===================================================================
2 //
3 // Description
4 // Helper class for crypting
5 //
6 // Revision history
7 // Date Description
8 // 01-May-2015 First version
9 //
10 // ===================================================================
11 #ifndef __CryptoKey__
12 #define __CryptoKey__
13 
14 #include "./Common.h"
15 #include "./ByteArray.h"
16 
17 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
18 
19 namespace Sfs2X {
20 namespace Util {
21 
25  class CryptoKey
26  {
27  public:
28 
29  // -------------------------------------------------------------------
30  // Public methods
31  // -------------------------------------------------------------------
32 
33  CryptoKey(boost::shared_ptr<ByteArray> iv, boost::shared_ptr<ByteArray> key);
34 
35  boost::shared_ptr<ByteArray> IV();
36  boost::shared_ptr<ByteArray> Key();
37 
38  // -------------------------------------------------------------------
39  // Public members
40  // -------------------------------------------------------------------
41 
42  protected:
43 
44  // -------------------------------------------------------------------
45  // Protected methods
46  // -------------------------------------------------------------------
47 
48  // -------------------------------------------------------------------
49  // Protected members
50  // -------------------------------------------------------------------
51 
52  private:
53 
54  // -------------------------------------------------------------------
55  // Private methods
56  // -------------------------------------------------------------------
57 
58  // -------------------------------------------------------------------
59  // Private members
60  // -------------------------------------------------------------------
61  boost::shared_ptr<ByteArray> iv;
62  boost::shared_ptr<ByteArray> key;
63  };
64 
65 } // namespace Util
66 } // namespace Sfs2X
67 
68 #endif
The encryption key
Definition: CryptoKey.h:25
Definition: SmartFox.cpp:24