Crypt function is used for encryption in PHP . This function accepts two parameters:
a) String to encrypt
b) Key
As a result , it returns ciphertext.
Since it is a one-way encryption , there is no way to recover the original string .
Code :
<?php //define password $password="devlup"; //define key $salt="gautham"; //encrypt password $cipher=crypt($password,$salt); echo $cipher; ?>