-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ofzafe edited this page Dec 13, 2014
·
1 revision
- About this project
- The
crypt()issue - Licence
This project has been built in order to regularise Project Management at Universidad Tecnológica Nacional
The crypt() php function was an issue of the Dev Team trying to be tacked for a long time. Hopefully, our great master @ofzafe programmer was the only one who could tacke this issue down. So, here we go, this is the php code:
<?php
define($hash_token,"$%&123");//$hash_token is the key to use in crypt()
public function crypt_password($password){
return $encripted_password = crypt($password,$hash_token);
}
public function login($user_name, $dumb_password){
$encripted_password = crypt($dumb_password, $hash_token);
$user = this->get_user_by_name($user_name);
/*being get_user_by_name a SQL function which queries
*SELECT * FROM User WHERE user_name = $user_name
*/
if(strcmp($user['password'], $encripted_password,)){
return $user;
}else{
return NULL;
}
}
?>This projet uses the version 3.0 of GPL (GNU Public License)
