To amplify on shmem's response, you can have md5 or sha digests, and they will reveal themselves by the $1 or $2 .
#!/usr/bin/perl use Crypt::PasswdMD5; #The secret to getting crypt to work correctly is in providing #a salt starting with '$1$' and having 8 characters #(instead of the normal 2 used for DES-crypt). #There are similar conventions for using other crypt variants #(e.g. '$2$' for SHA-crypt). my $passwd = 'whoopdeedoo'; my $salt = '$1$qwertyuz'; print "md5crypt salt= $salt \n"; print "-------------------------------------\n"; my $crypted = unix_md5_crypt $passwd, $salt; print "$crypted\n"; my $crypted = crypt $passwd, $salt; #crypt works as well print "$crypted\n"; print crypt ($passwd, $salt), "\n"; ###################################################################### print "#################################################\n"; print "des crypt salt= xy \n"; my $passwd = 'whoopdedoo'; my $salt = 'xy'; print "-------------------------------------\n"; my $crypted = crypt $passwd, $salt; print "$crypted\n"; print crypt ($passwd, $salt), "\n"; #Note that the MD5-based crypt() is not the same as #obtaining the hash of your password with Digest::MD5 or similar. #The algorithm used internally by the MD5-based crypt() uses a #number of transformations in which the MD5 algorithm is used, #but is very different. #Crypt::PasswdMD5 implements this algorithm in Perl, #allowing you to reproduce the result of said crypt() functions #in non-*nix systems or systems without a compatible crypt() #implementation.

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

In reply to Re: crypt(), authentication, and my new server by zentara
in thread crypt(), authentication, and my new server by poprishchin

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.