Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RFID generator spike:
node v8.17.0
version:
3.0.0
endpoint
share
tweet
const crypto = require('crypto'); const userId = "5a0c240e14952d000f034b11"; const institutionId = "56f9b3cb5a9b080f5f38bd10"; const key = userId + institutionId; // "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" const hash = crypto.createHash('sha256', key).digest('hex') console.log(hash) hash.slice(0, 8)
Created from: https://npm.runkit.com/
Loading…
no comments
sign in
to comment