Skip to main content
ECDH.prototype.getPrivateKey - node__crypto.d.ts - Node documentation
method ECDH.prototype.getPrivateKey

Usage in Deno

```typescript import { ECDH } from "node:node__crypto.d.ts"; ```
ECDH.prototype.getPrivateKey(): Buffer
If `encoding` is specified, a string is returned; otherwise a `Buffer` is returned.

Return Type

Buffer
The EC Diffie-Hellman in the specified `encoding`.
ECDH.prototype.getPrivateKey(encoding: BinaryToTextEncoding): string

Parameters

Return Type

string