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

Usage in Deno

```typescript import { DiffieHellman } from "node:node__crypto.d.ts"; ```
DiffieHellman.prototype.getPrivateKey(): Buffer
Returns the Diffie-Hellman private key in the specified `encoding`. If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.

Return Type

Buffer
DiffieHellman.prototype.getPrivateKey(encoding: BinaryToTextEncoding): string

Parameters

Return Type

string