Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

password generation

Asked Modified Viewed 879 times
Z
ZirouZ
Z
ZirouZ 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Newbie

Hello everyone! php fusion 7.02.07
I have a problem: generate a new password for user registration....
I need the password was written so:
this example will generate SHA1(CONCAT(UPPER('$user_name'),':',UPPER('$user_password parameters'))...
in the file PasswordAuth.class.php I found


   // Encrypts the password with given algorithm and salt
   private function _hashPassword($password, $algorithm, $salt) {
      if ($algorithm != "SHA1") {
         return hash_hmac($algorithm, $password, $salt);
      } else {
         return SHA1(SHA1($password));
      }
   }


I'm trying to do



   // Encrypts the password with given algorithm and salt
   private function _hashPassword($username, $password) {
      $user = strtoupper($user_name);
      $pass = strtoupper($password);
      return SHA1($user.':'.$pass);
   }



but it's not working... what is the idea? - password generation and encryption : password = sha1( username+user_password)
Edited by ZirouZ on 13-07-2015 15:00,
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

Z
Z
ZirouZ 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet