• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] sha1 crypt d check if is =

#1
[eluser]Unknown[/eluser]
Hello guys, i am a noob on this, i just want to know how I check encrypted data:

is for a basic password into database, not extreme security is needed.

Code:
$crypted = $this->encrypt->sha1($myvalue);

i save $crypted into a database field,

now i wish to check that user input is = to $crypted ....

will this work?

Code:
if( $crypted == $this->encrypt->sha1($uservalue) ) :

//do stuff

endif;

Thanks to this great community in advance Smile

Diego


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.