Browse Source

Update bip-0137.mediawiki

master
cgilliard 6 years ago
committed by GitHub
parent
commit
c6456f1607
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      bip-0137.mediawiki

3
bip-0137.mediawiki

@ -88,7 +88,6 @@ Note: this code is a modification of the BitcoinJ code which is written in java.
// JSON-SPIRIT hands back. Assume UTF-8 for now.
Sha256Hash messageHash = Sha256Hash.twiceOf(messageBytes);
boolean compressed = false;
// this section is added to support new signature types
if(header>= 39) // this is a bech32 signature
{
@ -104,9 +103,7 @@ Note: this code is a modification of the BitcoinJ code which is written in java.
compressed = true;
header -= 4;
}
int recId = header - 27;
ECKey key = ECKey.recoverFromSignature(recId, sig, messageHash, compressed);
if (key == null)
throw new SignatureException("Could not recover public key from signature");

Loading…
Cancel
Save