Module

std/node/crypto.ts>DiffieHellman

Deno standard library
Go to Latest
class DiffieHellman
import { DiffieHellman } from "https://dotland.deno.dev/std@0.177.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
import DiffieHellman
import { DiffieHellman } from "https://dotland.deno.dev/std@0.177.0/node/crypto.ts";