Switched back to sha256, sha512 is just too long.

This commit is contained in:
Ajay Ramachandran
2019-07-25 16:36:53 -04:00
parent 5fbe580c08
commit 71527cc4b1

View File

@@ -102,7 +102,7 @@ app.get('/api/postVideoSponsorTimes', function (req, res) {
let hashedIP = ip + globalSalt;
//hash it 5000 times, this makes it very hard to brute force
for (let i = 0; i < 5000; i++) {
let hashCreator = crypto.createHash('sha512');
let hashCreator = crypto.createHash('sha256');
hashedIP = hashCreator.update(hashedIP).digest('hex');
}
@@ -268,7 +268,7 @@ function getHashedUserID(userID) {
let hashedUserID = userID;
//hash it 5000 times, this makes it very hard to brute force
for (let i = 0; i < 5000; i++) {
let hashCreator = crypto.createHash('sha512');
let hashCreator = crypto.createHash('sha256');
hashedUserID = hashCreator.update(hashedUserID).digest('hex');
}