For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > May 2004 > Re: crypt function in PHP different from Perl's crypt? (0/1)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: crypt function in PHP different from Perl's crypt? (0/1)
Shane Lahey

2004-05-26, 8:31 pm

maybe this will be easier for u to use? (classes are always more fun)
:D

to use in your php script:

require_once('myenc.class.php');

// create a new instance of the MyENC class
$enc = new MyENC;

// to encrypt a string
$encoded = $enc->des_crypt('password');

// to check if 'password' is the same as $encoded (hope this makes
sense)
$same_as_encode = $enc->des_check('password', $encoded);


// destroy $enc if we are finished with it :D
unset($enc);

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com