Link to home
Start Free TrialLog in
Avatar of carchitect
carchitect

asked on

How to create nonce and PasswordDigest using standard C++

How to create nonce and PasswordDigest using standard C++
Avatar of Infinity08
Infinity08
Flag of Belgium image

What kind of digest do you want ?
One simple approach (if you can speak of 'simple' in that area at all) is presented at http://www.codeproject.com/cpp/cmd5.asp ("CMD5: A C++ Message Digest 5 Class"). You'd use that like

cout >> "Enter password:";
cin >> strUserEnteredPassword;
CMD5 md5((const char*)strUserEnteredPassword));
if(strcmp(md5.getMD5Digest(),
  (const char*)m_PreviouslyStoredDigestOfTheActualPassword)==0)
{
    //password is valid
}
else
{  
    //user entered incorrect password
}
The source code for the SHA1 digest is freely available as part of the RFC: -
http://www.ietf.org/rfc/rfc3174.txt
Avatar of carchitect
carchitect

ASKER

How does WSE (Security Enhancement)generates nonce value?
I didn't get any satisfactory answer and would like to close the question
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's kind of hard to help you if you don't answer questions for clarification ...
Hi Infinity

Sorry, but if i missed to answer anything. I changed my way to solve the problem, instead of using WSE now, i am using oracle to perform Base64 and SHA1.