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

Usage in Deno

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

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

Return Type

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

Parameters

Return Type

string