示例#1
0
 //    /**
 //       * Verifies that the private key associated with the provided public key produces the
 //       * signature associated with the given message.
 //       *
 //       * @param msg The message associated with the signature
 //       * @param sig The signature of the signed message
 //       * @param pubk The public key associated with the message signature
 //       *
 //       * @returns True on success, false on failure
 //       */
 public abstract bool Verify(Buffer msg, Buffer sig, Buffer pubk);
示例#2
0
 //    /**
 //       * Recovers the public key of a message signer from a message and its associated signature.
 //       *
 //       * @param msg The message that's signed
 //       * @param sig The signature that's signed on the message
 //       *
 //       * @returns A {@link https://github.com/feross/buffer|Buffer} containing the public
 //       * key of the signer
 //       */
 public abstract Buffer Recover(Buffer msg, Buffer sig);
示例#3
0
 //    /**
 //       * Imports a private key and generates the appropriate public key.
 //       *
 //       * @param privk A {@link https://github.com/feross/buffer|Buffer} representing the private key
 //       *
 //       * @returns true on success, false on failure
 //       */
 public abstract bool ImportKey(Buffer privateKey);
示例#4
0
 //    /**
 //       * Takes a message, signs it, and returns the signature.
 //       *
 //       * @param msg The message to sign
 //       *
 //       * @returns A {@link https://github.com/feross/buffer|Buffer} containing the signature
 //       */
 public abstract Buffer Sign(Buffer msg);
示例#5
0
 /**
  * Generates a new keypair.
  *
  * @param entropy Optional parameter that may be necessary to produce secure keys
  */
 public abstract void GenerateKey(Buffer entropy);