Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from 94b1/master
Browse files Browse the repository at this point in the history
Use crypto.randomBytes
  • Loading branch information
bluzi authored Apr 5, 2018
2 parents 68fb657 + b3b214c commit 8ad5f9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { URL } = require('url');
const router = express.Router();

router.get('/get-link', (req, res) => {
const seed = Math.random().toString();
const seed = crypto.randomBytes(64);
const hash = crypto.createHash('sha256').update(seed).digest('hex');

const url = new URL(req.get('referer'));
Expand Down

0 comments on commit 8ad5f9c

Please sign in to comment.