Let me say, re-reading this thread after ever so long, that you can both use MD5 and use Perl's crypt() on GNU/Linux and certain other systems without the use of outside modules.

If you hand crypt() on GNU/Linux a bare salt, it's used for DES (or triple DES actually I think in Linux's case). If you hand crypt() a salt of the format $1$salt$ then it does MD5, with up to 8 characters of salt and up to 22 bytes of (encrypted) password.

With Perl's crypt being implemented on Linux as a wrapper around the library call, it behaves the same.

This is at least valid on GNU/Linux. The man page for crypt(3) on a GNU/Linux box I was just on says it's a GNU extension as of glibc2. So I'd imagine that any system using glibc2 (and on which perl is linked against the crypt library, which is a specific requirement according to the man page) should be able to do the same.

Look at crypt(3) with your friendly neighborhood man program or its equivalent on your target system(s) to find out for sure.

Christopher E. Stith

In reply to Re: What's the idea of different salts in crypt()? by mr_mischief
in thread What's the idea of different salts in crypt()? by jeorgen

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.