Upgraded IP-Hashing Algorithm to SHA-512
This commit is contained in:
parent
64348b8486
commit
3d2b40b3c8
|
|
@ -52,7 +52,7 @@ module.exports.comparePassword = function(pass, hash){
|
||||||
*/
|
*/
|
||||||
module.exports.hashIP = function(ip){
|
module.exports.hashIP = function(ip){
|
||||||
//Create hash object
|
//Create hash object
|
||||||
const hashObj = crypto.createHash('md5');
|
const hashObj = crypto.createHash('sha512');
|
||||||
|
|
||||||
//add IP and salt to the hash
|
//add IP and salt to the hash
|
||||||
hashObj.update(`${ip}${config.ipSecret}`);
|
hashObj.update(`${ip}${config.ipSecret}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue