My usual way of approaching this is to encrypt the password with the sha512_base64 method from Digest::SHA. I then generate a random 40 character string to salt the password. The random string gets changed when the user changes their password. I split the 64-character encoded password into two parts and insert a hash of the salt. I split the encoded password a different place for each site I write.

I reckon that's pretty unbreakable without access to the codebase.

But, the difficulty isn't encoding the passwords or storing passwords and possibly salts.

As you rightly point out, the biggest difficulty is that we can't just send out encoded passwords. Once encoded, users need a means to select a new password, and that means a whole new workflow needs to be created. It's simple enough to do but there is quite a bit of work. Another issue is that it would be difficult to properly test without a test server but certainly not impossible.


In reply to Re^2: Priorities perhaps? by Bod
in thread Priorities perhaps? by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.