@acusti/webcrypto
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@acusti/webcrypto

latest version maintenance status downloads per month install size

webcrypto exports window.crypto / self.crypto for use in a browser environment (regular or worker) and the equivalent of require('node:crypto').webcrypto for use in node.js. When used in node, it requires node.js v15.0.0 or later.

Usage

npm install @acusti/webcrypto
# or
yarn add @acusti/webcrypto
import webcrypto from '@acusti/webcrypto';

const uuid = webcrypto.randomUUID();

const data = new TextEncoder().encode('data to hash');
const digest = await webcrypto.subtle.digest({ name: 'SHA-256' }, data);

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i @acusti/webcrypto

    Weekly Downloads

    113

    Version

    1.0.2

    License

    Unlicense

    Unpacked Size

    7.58 kB

    Total Files

    22

    Last publish

    Collaborators

    • acusti