Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function decodeHex(data) {
return sjcl.codec.utf8String.fromBits(sjcl.codec.hex.toBits(data));
}
function computeSignature(txJSON, keypair) {
var signature = keypair.sign(signingHash(txJSON));
return sjcl.codec.hex.fromBits(signature).toUpperCase();
}