Пример #1
0
 /**
  * @param string $message
  * @param PrivateKeyInterface $privateKey
  * @return SignedMessage
  */
 public function sign($message, PrivateKeyInterface $privateKey)
 {
     $hash = $this->calculateMessageHash($message);
     return new SignedMessage($message, $this->ecAdapter->signCompact($hash, $privateKey, new Rfc6979($this->ecAdapter, $privateKey, $hash, 'sha256')));
 }