Skip to main content
Module

std/node/crypto.ts>DiffieHellman

Deno standard library
Go to Latest
class DiffieHellman
Re-export
import { DiffieHellman } from "https://deno.land/std@0.166.0/node/crypto.ts";

Constructors

new
DiffieHellman(
sizeOrKey: unknown,
keyEncoding?: unknown,
generator?: unknown,
genEncoding?: unknown,
)

Properties

verifyError: number

Methods

computeSecret(otherPublicKey: ArrayBufferView): Buffer
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer
computeSecret(otherPublicKey: ArrayBufferView, outputEncoding: BinaryToTextEncoding): string
computeSecret(
otherPublicKey: string,
inputEncoding: BinaryToTextEncoding,
outputEncoding: BinaryToTextEncoding,
): string
generateKeys(): Buffer
getGenerator(): Buffer
getPrime(): Buffer
getPrime(encoding: BinaryToTextEncoding): string
getPrivateKey(): Buffer
getPublicKey(): Buffer
setPrivateKey(privateKey: ArrayBufferView): void
setPrivateKey(privateKey: string, encoding: BufferEncoding): void
setPublicKey(publicKey: ArrayBufferView): void
setPublicKey(publicKey: string, encoding: BufferEncoding): void