Hash a password using SHA1 in PHP Codeigniter

To use the sha1 function we should load the CodeIgniter Encryption Library. This is the Library that holds the sha1 function.

$this->load->library(' encryption' ) ;
$password = 'asd1234' ;
$hash = $this->encrypt- >sha1($password) ;

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.