Skip to main content
Module

x/easysecurity/mod.ts>Key

Basic security API for Typescript that optimizes for easy use
Go to Latest
class Key
import { Key } from "https://deno.land/x/easysecurity@0.1.4/mod.ts";

Constructors

new
Key(cryptoKey: CryptoKey)

Properties

readonly
cryptoKey: CryptoKey

Methods

toHex(): Promise<string>

export the hex serialization of the Key

Static Properties

readonly
Extractable: boolean
readonly
Params: AesKeyGenParams
readonly
Usages: KeyUsage[]

Static Methods

fromHex(hexKey: string): Promise<Key>

construct a new Key based on the exported Key hex representation

generate(): Promise<Key>

construct a new Key based on a new random seed