Skip to main content
Verify.prototype.verify - node__crypto.d.ts - Node documentation
method Verify.prototype.verify

Usage in Deno

```typescript import { Verify } from "node:node__crypto.d.ts"; ```
Verify.prototype.verify(): boolean
Verifies the provided data using the given `object` and `signature`. If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to [createPublicKey](../.././node__crypto.d.ts/~/createPublicKey). If it is an object, the following additional properties can be passed: The `signature` argument is the previously calculated signature for the data, in the `signatureEncoding`. If a `signatureEncoding` is specified, the `signature` is expected to be a string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. The `verify` object can not be used again after `verify.verify()` has been called. Multiple calls to `verify.verify()` will result in an error being thrown. Because public keys can be derived from private keys, a private key may be passed instead of a public key.

Parameters

Return Type

boolean
Verify.prototype.verify(): boolean

Parameters

signature: string
optional
signature_format: BinaryToTextEncoding

Return Type

boolean