Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
938 B

#ifndef _AUTHENTICATION_H_
#define _AUTHENTICATION_H_
class CAuthentication
{
public:
CAuthentication();
~CAuthentication();
static CAuthentication* GetAuthentication();
static PSTR GetMD5Result(PCSTR pszClearText);
static PSTR GetMD5Result(PSTR pszChallengeInfo, PSTR pszPassword);
static PSTR GetHMACMD5Result(PSTR pszChallengeInfo, PSTR pszPassword);
private:
static PSTR GetMD5Key(PSTR pszChallengeInfo, PSTR pszPassword);
static CAuthentication* m_spAuthentication;
};
inline
CAuthentication::CAuthentication()
{
// Make sure that the singleton object is not instantiated multiple times.
_ASSERT(NULL == m_spAuthentication);
m_spAuthentication = this;
}
inline
CAuthentication::~CAuthentication()
{
m_spAuthentication = NULL;
}
inline CAuthentication*
CAuthentication::GetAuthentication()
{
return m_spAuthentication;
}
#endif // _AUTHENTICATION_H_