Am 25.01.2013 20:26, schrieb Olaf Radicke:
>
>> Julian Wiesener <[email protected]> hat am 25. Januar 2013 um 17:56 geschrieben:
>> On Fri, 2013-01-25 at 17:00 +0100, Olaf Radicke wrote:
>>> I can't find this function in the API:
>>> http://www.tntnet.org/classes.html
> [...]
>> std::string hash(cxxtools::hmac<cxxtools::md5_hash<std::string> >(salt,
>> passwd));
> For my, it is looking like this:
>
>      saltedPasswordHash = cxxtools::md5 ( password + salt );
>
> It is the same?
>
> Best regards,
>
> Olaf
As long as salted md5 passwords are ok for you. HMac is more secure but 
salted md5 is good for most use cases.

To check the password, you must store the salt also of course. Something 
like that:

saltedPasswordHash = salt + ':' + cxxtools::md5(password + salt);


Tommi

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to