Module

std/node/crypto.ts

Deno standard library
Go to Latest
class DiffieHellman
import { DiffieHellman } from "https://deno.land/std@0.145.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
computeSecret(
_otherPublicKey: ArrayBufferView | string,
_inputEncoding?: BinaryToTextEncoding,
_outputEncoding?: BinaryToTextEncoding,
): Buffer | string
generateKeys(): Buffer
generateKeys(encoding: BinaryToTextEncoding): string
generateKeys(_encoding?: BinaryToTextEncoding): Buffer | string
getGenerator(): Buffer
getGenerator(encoding: BinaryToTextEncoding): string
getGenerator(_encoding?: BinaryToTextEncoding): Buffer | string
getPrime(): Buffer
getPrime(encoding: BinaryToTextEncoding): string
getPrime(_encoding?: BinaryToTextEncoding): Buffer | string
getPrivateKey(): Buffer
getPrivateKey(encoding: BinaryToTextEncoding): string
getPrivateKey(_encoding?: BinaryToTextEncoding): Buffer | string
getPublicKey(): Buffer
getPublicKey(encoding: BinaryToTextEncoding): string
getPublicKey(_encoding?: BinaryToTextEncoding): Buffer | string
setPrivateKey(privateKey: ArrayBufferView): void
setPrivateKey(privateKey: string, encoding: BufferEncoding): void
setPrivateKey(_privateKey: ArrayBufferView | string, _encoding?: BufferEncoding): void
setPublicKey(publicKey: ArrayBufferView): void
setPublicKey(publicKey: string, encoding: BufferEncoding): void
setPublicKey(_publicKey: ArrayBufferView | string, _encoding?: BufferEncoding): void
import DiffieHellman
import { DiffieHellman } from "https://deno.land/std@0.145.0/node/crypto.ts";