nodejs hashing
const crypto = require('crypto');
const secret = 'abcdefg';
const hash = crypto.createHmac('sha256', secret)
.update('I love cupcakes')
.digest('hex');
console.log(hash);
// Prints:
// c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
const crypto = require('crypto');
const secret = 'abcdefg';
const hash = crypto.createHmac('sha256', secret)
.update('I love cupcakes')
.digest('hex');
console.log(hash);
// Prints:
// c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
Also in JavaScript:
- ip address pattern regex javascript
- javascript test if it is an array
- how to select the first div in jQuery
- flutter betterplayer get aspect ratio
- vue methods v-on =!
- async map js
- javascript get last element of array
- vscode new file shortcut
- javascript muuttujan määrittely
- how to print diamond pattern in javascript
- Material-ui clock icon
- how to set json type jquery ajax
- jquery add style
- reactnode prop-types
- mongodb replace document
- pdf javascript search text
- how to find a name of class from page in jquery
- jquery ajax refresh
- bind in javascript
- js anonymous functions
- code array javascript
- readfilesync
- jstl expects equals
- javascript check if string contains a text substring