Jonathan Underwood
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
ts_src/ecpair.ts
|
|
@ -26,7 +26,7 @@ export interface ECPairInterface { |
|
|
|
publicKey?: Buffer; |
|
|
|
toWIF(): string; |
|
|
|
sign(hash: Buffer): Buffer; |
|
|
|
verify(hash: Buffer, signature: Buffer): Buffer; |
|
|
|
verify(hash: Buffer, signature: Buffer): boolean; |
|
|
|
getPublicKey?(): Buffer; |
|
|
|
} |
|
|
|
|
|
|
@ -66,7 +66,7 @@ class ECPair implements ECPairInterface { |
|
|
|
return ecc.sign(hash, this.__D); |
|
|
|
} |
|
|
|
|
|
|
|
verify(hash: Buffer, signature: Buffer): Buffer { |
|
|
|
verify(hash: Buffer, signature: Buffer): boolean { |
|
|
|
return ecc.verify(hash, this.publicKey, signature); |
|
|
|
} |
|
|
|
} |
|
|
|