Skip to main content
Home

Built and signed on GitHub Actions

🧮 Features based upon Web Crypto APIs

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a week ago (2.0.5)
function decrypt
decrypt(
message: string,
unnamed 1: { key: CryptoKey | string; },
): Promise<string>

Decrypt message encrypted by encrypt function with specified key.

import { decrypt, encrypt, exportKey } from "./encryption.ts"
const key = await exportKey({ seed: "", salt: "" })
console.assert(await decrypt(await encrypt("🍱 bento", {key}), { key }) === "🍱 bento")

Parameters

message: string
unnamed 1: { key: CryptoKey | string; }

Return Type

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@libs/crypto

Import symbol

import { decrypt } from "@libs/crypto/encryption";
or

Import directly with a jsr specifier

import { decrypt } from "jsr:@libs/crypto/encryption";

Add Package

pnpm i jsr:@libs/crypto
or (using pnpm 10.8 or older)
pnpm dlx jsr add @libs/crypto

Import symbol

import { decrypt } from "@libs/crypto/encryption";

Add Package

yarn add jsr:@libs/crypto
or (using Yarn 4.8 or older)
yarn dlx jsr add @libs/crypto

Import symbol

import { decrypt } from "@libs/crypto/encryption";

Add Package

vlt install jsr:@libs/crypto

Import symbol

import { decrypt } from "@libs/crypto/encryption";

Add Package

npx jsr add @libs/crypto

Import symbol

import { decrypt } from "@libs/crypto/encryption";

Add Package

bunx jsr add @libs/crypto

Import symbol

import { decrypt } from "@libs/crypto/encryption";