RunKit + npm: crypto-js

node v4.9.1
version: 1.0.0
endpointsharetweet
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