Initial refactor (routes and utils to respective folders)

This commit is contained in:
Joe-Dowd
2020-03-19 23:20:33 +00:00
parent f6826b60b0
commit 5c3d18b0e2
18 changed files with 1094 additions and 982 deletions

10
src/utils/getHash.js Normal file
View File

@@ -0,0 +1,10 @@
var crypto = require('crypto');
module.exports = function (value, times=5000) {
for (let i = 0; i < times; i++) {
let hashCreator = crypto.createHash('sha256');
value = hashCreator.update(value).digest('hex');
}
return value;
}