<div dir="ltr">I don't use Dancer, but I believe what you're looking for is Dancer2::Plugin::Passphrase.<div><br></div><div><a href="https://metacpan.org/pod/Dancer2::Plugin::Passphrase">https://metacpan.org/pod/Dancer2::Plugin::Passphrase</a><br></div><div><br></div><div>The important things to do (especially if you opt not to use a plugin) is to ensure you are using distinct per-user salts and using a strong hashing algorithm (e.g. bcrypt).  You'll store the salt and the bcrypt result in two columns in your DB.  To validate an authentication request from a user you will take their input, concatenate it with the same salt, bcrypt the result, and then compare the output to what you have stored.  If they match, the password was correctly entered.</div><div><br></div><div>-Chris</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 11, 2015 at 5:21 PM,  <span dir="ltr"><<a href="mailto:richard@rushlogistics.com" target="_blank">richard@rushlogistics.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am using dancer2 and was wondering if someone could point me in the direction of code that encrypts a password provided by a user and so that it can be stored in a MySQL database and code that would would allow me to match a provided password with the stored one when the user wants to log back in. Would in be better to use some sort of dancer plugin or just write my own code that uses Blowfish and Crypt:CBC? I am hoping that there must be some strong existing code out there. Please let me know if you know of any or if you have any ideas.<br>
<br>
Thanks<br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
</blockquote></div><br></div>