Module

std/node/crypto.ts>ECDH

Deno standard library
Go to Latest
class ECDH
import { ECDH } from "https://deno.land/std@0.145.0/node/crypto.ts";

Constructors

new
ECDH(curve: string)

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, format?: ECDHKeyFormat): string
generateKeys(_encoding?: BinaryToTextEncoding, _format?: ECDHKeyFormat): Buffer | string
getPrivateKey(): Buffer
getPrivateKey(_encoding?: BinaryToTextEncoding): Buffer | string
getPublicKey(): Buffer
getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string
getPublicKey(_encoding?: BinaryToTextEncoding, _format?: ECDHKeyFormat): Buffer | string
setPrivateKey(privateKey: ArrayBufferView): void
setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void
setPrivateKey(_privateKey: ArrayBufferView | string, _encoding?: BinaryToTextEncoding): Buffer | string

Static Methods

convertKey(
_key: BinaryLike,
_curve: string,
_inputEncoding?: BinaryToTextEncoding,
_outputEncoding?:
| "latin1"
| "hex"
| "base64"
| "base64url"
,
_format?: "uncompressed" | "compressed" | "hybrid",
): Buffer | string
import ECDH
import { ECDH } from "https://deno.land/std@0.145.0/node/crypto.ts";