Beispiel #1
0
var generateKeyPair = function() {
  var keyPair = nacl.sign.keyPair();
  return {
    pubKey: keyPair.publicKey,
    priKey: keyPair.secretKey
  };
};
Beispiel #2
0
var getSignature = function(message, priKey) {
  _checkPriKeyLength(priKey);
  var signature = nacl.sign.detached(message, priKey);
  return signature;
};