Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-19 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found