Call php function crypt()

#1

Hello,
Can you please advise me how to call the original crypt function from PHP which is library string function?
Thank you.

#2

Can you be more specific? crypt is just a PHP function, you call it the same as any other PHP function.

#3

Hi
function crypt in library string return Unix DES-based algorithm,
function crypt in cakephp is function diferent function

function crypt from php string library return hash “5‘salt’password
crypt(“e918b220b0a4d804”,‘sha256’,‘abcdefghijklmnop’) return
$5$abcdefghijklmnop$pm33z8Cb7ABYGN9Sun5xtC4a4cNriMhHddJKdtiANA1

Function crypt from cake php library is different
$hash_new= crypt(‘e918b220b0a4d804’,‘abcdefghijklmnop’);
return
‘ab38/fXKQY82I’

#4

Sorry this is my error.
Thanks

#5

I think you might be looking for Security::hash()?