DiffieHellman.prototype.getPrivateKey - Node documentation
method DiffieHellman.prototype.getPrivateKey

Usage

import { DiffieHellman } from "node:crypto";

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

Parameters

Return Type

string