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
RunKit + npm: crypto-js
node v4.9.1
version:
1.0.0
endpoint
share
tweet
var CryptoJS, sign; CryptoJS = require('crypto-js'); sign = function(){ var args, hex; args = Array.prototype.slice.call(arguments);require("crypto-js") if (sign.key == null) { throw "Please call keys(callback)"; } hex = CryptoJS.SHA512(args.join(';'), sign.key.trim()).toString(CryptoJS.enc.HEX).toUpperCase(); return hex.toUpperCase(); }; sign.key = "-----PRIVATE KEY" sign("login", "password")
Created from: https://runkit.com/npm/crypto-js
Loading…
no comments
sign in
to comment