Skip to main content
DiffieHellman.prototype.getPrime - crypto - Node documentation
method DiffieHellman.prototype.getPrime

Usage in Deno

import { DiffieHellman } from "node:crypto";
DiffieHellman.prototype.getPrime(): Buffer

Returns the Diffie-Hellman prime in the specified encoding. If encoding is provided a string is returned; otherwise a Buffer is returned.

Return Type

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

Parameters

Return Type

string