mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-15 16:07:03 +03:00
Switched back to sha256, sha512 is just too long.
This commit is contained in:
4
index.js
4
index.js
@@ -102,7 +102,7 @@ app.get('/api/postVideoSponsorTimes', function (req, res) {
|
|||||||
let hashedIP = ip + globalSalt;
|
let hashedIP = ip + globalSalt;
|
||||||
//hash it 5000 times, this makes it very hard to brute force
|
//hash it 5000 times, this makes it very hard to brute force
|
||||||
for (let i = 0; i < 5000; i++) {
|
for (let i = 0; i < 5000; i++) {
|
||||||
let hashCreator = crypto.createHash('sha512');
|
let hashCreator = crypto.createHash('sha256');
|
||||||
hashedIP = hashCreator.update(hashedIP).digest('hex');
|
hashedIP = hashCreator.update(hashedIP).digest('hex');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ function getHashedUserID(userID) {
|
|||||||
let hashedUserID = userID;
|
let hashedUserID = userID;
|
||||||
//hash it 5000 times, this makes it very hard to brute force
|
//hash it 5000 times, this makes it very hard to brute force
|
||||||
for (let i = 0; i < 5000; i++) {
|
for (let i = 0; i < 5000; i++) {
|
||||||
let hashCreator = crypto.createHash('sha512');
|
let hashCreator = crypto.createHash('sha256');
|
||||||
hashedUserID = hashCreator.update(hashedUserID).digest('hex');
|
hashedUserID = hashCreator.update(hashedUserID).digest('hex');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user