Hi,

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

md5_hash you can find here
http://www.tntnet.org/classcxxtools_1_1md5__hash.html however hmac is
not there. You'll find it in cxxtools/hmac.h, just function tamplates,
to generate hashes as strings:


std::string rand = "sorry no random string in cxxtools";
std::string passwd = "secret";

std::string salt(cxxtools::hmac<cxxtools::md5_hash<std::string> >(rand,
passwd));
std::string hash(cxxtools::hmac<cxxtools::md5_hash<std::string> >(salt,
passwd));


comparing stings if you want to verify on server site is of course easy:

(hash == cxxtools::hmac<cxxtools::md5_hash<std::string> >(salt,
passwd));




Regards,
Julian


------------------------------------------------------------------------------
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