FacebookTwitterDiggDeliciousStumbleuponGoogle BookmarksRedditLinkedin

Up

Authme Reloaded Plugin Hash

Authme Reloaded Plugin Hash
File Size:
18 B
Version:
0.1
Date:
28 February 2013
Downloads:
48 x

Well, I was found a lot of servers that want to connect his Authme-reloaded plugin with other CMS but doesn't know how to do it. There are a real misunderstanding cause author's plugin says that you need to check the password with 'SHA256' hash, but that is not so.

Notes

You need to do that -> encryptedPassword = "$SHA$" + salt + "$" + sha256(sha256(password) + salt);

I will explain how to extract the salt from the password and make the solution for connect our server with all kind of web CMS.

Ok, what is the salt? We never configured a salt!, how we can do that without the default salt?
 
If you read more and more you will see that the deafult salt is "salt" But this doesn't mean that you need to put "salt" noooo
 
You need to do something like that:
 
For example you have this password:
 
$SHA$a1f9d6d409f03e2c$fe742523771dfaefa7c4e164720966442d54d3b887a9d953784d1cc5e234b447
 
And you know (in this example) that the password is ->>> "ejemplo"
 
Ok you need to explode it ($) making something like that:
 
SHA a1f9d6d409f03e2c fe742523771dfaefa7c4e164720966442d54d3b887a9d953784d1cc5e234b447
 
Ok the important now is this -> "a1f9d6d409f03e2c". This is the salt! right??
 
Then you can do all that you want, I will put an example in php where you will be sure how to do that:
 
?pp
echo '$SHA$'.'a1f9d6d409f03e2c'.'$'.hash('sha256',hash('sha256', 'ejemplo').'a1f9d6d409f03e2c');
?>
 
Obvioubsly that's an example, you will need to make a function for do that more good.
 
Here you have my own function for Authme-reloaded plugin (only SHA256):
 
 
function checkPassword($trypass,$realpass){
     $parts = explode('$',$realpass);
     $salt = $parts[2];
     $hashed = hash('sha256',hash('sha256', $trypass).$salt);
     $hashed = '$SHA$'.$salt.'$'.$hashed;
     return $hashed == $realpass ? true : false;
}
Rating: 0 / 0 vote  
Only registered and logged in users can rate this file
 
 
 
 

Freedom Code

All existing content on this site can be used and modified to pleasure the developer who implements it. 

There are full and complete freedom to use the code. Developers can collaborate on this projects or recommend changes for improve it.

Contact