What a coincidence! I was wondering about thy same thing. Will this work on ActiveState Perl running WinXP2003 Server? I have Cygwin installed which should give me a glibc, but don't think ActiveState knows about it.
How would I do this on my platform? Thanks, Siegfried -----Original Message----- From: Mike Blezien [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 8:00 AM To: zentara Cc: beginners@perl.org Subject: Re: Password Encryption Thx's.... works like a charm. :) zentara wrote: > On Tue, 28 Dec 2004 08:14:37 -0600, [EMAIL PROTECTED] (Mike > Blezien) wrote: > > >>Hello, >> >>Been trying to figure out how to encrypt a password w/Perl so it's uses the same >>scheme used in a webmin control panel for password protecting directories. It >>says it's the MD5 method, but I have tried serveral variations using the MD5 and >>Digest::MD5 but can't seem to find the correct format. This is a sample of a >>encyrpted password generated by the control panel: >>$1$03838433$k1ZFcLyZ13Q8tU.3WpK9o1 >> >>Is there a Perl method to encrypt plain text password in this same manner ?? > > > #!/usr/bin/perl > > print "Standard crypt output\n"; > print crypt("password","sa"), "\n"; > > #glibc's implementation that takes care of this. Since perl on > # Linux uses glibc, you get this automagically. When the salt looks like > # $1$...., it will encrypt the password using MD5. e.g. > > print "MD5 crypt output\n"; > print crypt("password","\$1\$thesalt\$"), "\n"; > > > > > -- Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>