SmartFoxServer 2X C++ API
PasswordUtil.h
1 // ===================================================================
2 //
3 // Description
4 // Helper class for logging in with a pre-hashed password
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __PasswordUtil__
12 #define __PasswordUtil__
13 
14 #include "./Common.h"
15 
16 #include <stdio.h>
17 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
18 
19 #if defined(_MSC_VER)
20 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
21 #endif
22 #include <string> // STL library: string object
23 using namespace std; // STL library: declare the STL namespace
24 
25 namespace Sfs2X {
26 namespace Util {
27 
35  class DLLImportExport PasswordUtil
36  {
37  public:
38 
39  // -------------------------------------------------------------------
40  // Public methods
41  // -------------------------------------------------------------------
42 
61  static boost::shared_ptr<string> MD5Password(string pass);
62 
63  // -------------------------------------------------------------------
64  // Public members
65  // -------------------------------------------------------------------
66 
67  protected:
68 
69  // -------------------------------------------------------------------
70  // Protected methods
71  // -------------------------------------------------------------------
72 
73  // -------------------------------------------------------------------
74  // Protected members
75  // -------------------------------------------------------------------
76 
77  private:
78 
79  // -------------------------------------------------------------------
80  // Private methods
81  // -------------------------------------------------------------------
82 
83  // -------------------------------------------------------------------
84  // Private members
85  // -------------------------------------------------------------------
86  };
87 
88 } // namespace Util
89 } // namespace Sfs2X
90 
91 #endif
STL namespace.
Helper class for logging in with a pre-hashed password
Definition: PasswordUtil.h:35
Definition: SmartFox.cpp:24