Skip to main content
X509Certificate.prototype.checkPrivateKey - node__crypto.d.ts - Node documentation
method X509Certificate.prototype.checkPrivateKey

Usage in Deno

```typescript import { X509Certificate } from "node:node__crypto.d.ts"; ```
X509Certificate.prototype.checkPrivateKey(privateKey: KeyObject): boolean
Checks whether the public key for this certificate is consistent with the given private key.

Parameters

privateKey: KeyObject
A private key.

Return Type

boolean