Note for Windows folks: getting crypt to
supply MD5 encryption as described
by
tadman is not supported in ActiveState Perl.
print "Long: ", crypt('shjdajksds', '$1$abcdefgh'), "\n";
print "Short: ", crypt('shjdajksds', '$1' ), "\n";
Using ActiveState build 623 this produces:
Long: $1G0qFXI2hLqU
Short: $1G0qFXI2hLqU
But on Linux we get:
Long: $1$abcdefgh$LBpJSL4DEIVrkp1RZO36I0
Short: $1KHjUeDByb1c
As is often the case YMMV. (Can we assume that Linux Perl
is calling a system function which supports the MD5
option?) The standard Perl doc page for
crypt doesn't
mention this behavior. Nor
does '
man crypt'
on my Linux system.
Where is it documented?
And I don't even want to talk about why the short
versions are different on the two systems. Yuck!
(I ran this several times to be sure.)
Are 'standard' passwords not sharable across
platforms?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.