RevCMS Password Hashing

Results 1 to 7 of 7
  1. #1
    Valued Member Blasteh is offline
    MemberRank
    Apr 2013 Join Date
    127Posts

    RevCMS Password Hashing

    Hello,
    I'm resetting my hotel and I want to encrypt passwords differently. I want to use a more secure one, such as bcrypt.

    By default, rev uses md5.

    PHP Code:
        final public function hashed($password)
        {
            return 
    md5($password);
        } 

    I want to use a more secure method, such as bcrypt, how would I go about doing this?


  2. #2
    Valued Member Blasteh is offline
    MemberRank
    Apr 2013 Join Date
    127Posts

    Re: RevCMS Password Hashing

    anyone?

  3. #3
    Member Aamiainen is offline
    MemberRank
    Aug 2016 Join Date
    FinlandLocation
    83Posts

    Re: RevCMS Password Hashing

    just google it?

  4. #4
    Hakuna Matata Matata is offline
    MemberRank
    Sep 2012 Join Date
    DenmarkLocation
    807Posts

    Re: RevCMS Password Hashing

    According to PHP: password_hash - Manual
    PHP Code:
    string password_hash string $password integer $algo [, array $options ] ) 
    So, to use bcrypt, you would replace your function with this:
    PHP Code:
        final public function hashed($password)
        {
            return 
    password_hash($passwordPASSWORD_BCRYPT);
        } 

  5. #5
    Valued Member Blasteh is offline
    MemberRank
    Apr 2013 Join Date
    127Posts

    Re: RevCMS Password Hashing

    Quote Originally Posted by Matata View Post
    According to PHP: password_hash - Manual
    PHP Code:
    string password_hash string $password integer $algo [, array $options ] ) 
    So, to use bcrypt, you would replace your function with this:
    PHP Code:
        final public function hashed($password)
        {
            return 
    password_hash($passwordPASSWORD_BCRYPT);
        } 
    I know that, but; its the login that is the issue. It's not verifying the password in bCrypt form.

    - - - Updated - - -

    Quote Originally Posted by Aamiainen View Post
    just google it?
    You think I didn't google it already? That was a fucking pointless reply.

  6. #6
    The **** Keiz is offline
    MemberRank
    Nov 2015 Join Date
    238Posts

    Re: RevCMS Password Hashing

    Salted SHA256?

  7. #7
    Member Aamiainen is offline
    MemberRank
    Aug 2016 Join Date
    FinlandLocation
    83Posts

    Re: RevCMS Password Hashing

    Note that password_hash() returns the algorithm, cost and salt as part of the returned hash. Therefore, all information that's needed to verify the hash is included in it. This allows the verify function to verify the hash without needing separate storage for the salt or algorithm information.
    Meaning that your problem lies elsewhere. Actually i'm pretty sure your hash column in users table isn't long enough, generated hash. So i'd suggest you try increasing length of hash column.



Advertisement