• Resolved vcomgrp

    (@vcomgrp)


    Hi,

    I’m trying to connect my WordPress site to my an old service that used Rails Authlogic. It uses SHA512 hashing (password + salt), but loops through hashing 20 times. (i.e. password+salt gets hashed, then it takes the hashed+salted password and hashes again, and does this 20 times).

    Is there any way the plugin can accommodate this?

    Many thanks!
    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author tbenyon

    (@tbenyon)

    Hey @vcomgrp,

    Apologies for the delayed response. Yes it can but just requires the use of a filter your end.

    If you go to the FAQ and look at the exlog_hook_filter_authenticate_hash hook there’s some instruction in there about how to write your custom hashing algorithm.

    I have not tested this code but yours would look something like this:

    
    
    function myExlogHashAuthenticator($password, $hashFromDatabase, $username, $externalUserData) {
        $calculatedHash = $password;
        for ($i = 1; $i <= 20; $i++) {
            $calculatedHash = hash('sha512', $calculatedHash);
        }
        return $hashFromDatabase == $calculatedHash;
    }
    add_filter('exlog_hook_filter_authenticate_hash', 'myExlogHashAuthenticator', 10, 4);
    

    Let me know how you get on ??

    Plugin Author tbenyon

    (@tbenyon)

    Hey @vcomgrp,

    Haven’t heard back from you for a while so I’m going to assume this is resolved.

    If not, don’t hesitate to get back in contact and we’ll see what we can do ??

    Thanks,

    Tom ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Old Service Loops Through Hashing 20 Times’ is closed to new replies.