Socket
Socket
Sign inDemoInstall

uncrypto

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

uncrypto

Single API for Web Crypto API and Crypto Subtle working in Node.js, Browsers and other runtimes


Version published
Maintainers
1
Weekly downloads
859,768
decreased by-6.74%

Weekly downloads

Readme

Source

uncrypto

npm version npm downloads Github Actions Codecov

This library provides a single api to use web-crypto and Subtle Crypto in both Node.js using Crypto Module and Web targets using Web Crypto API using Conditional Exports.

Requirements:

  • Node.js: Version 15 and above (this library provides no polyfills for older versions!)
  • Browser: Secure Context (HTTPS/Localhost) in Supported Browsers
  • Other Runtimes: Exposed globalThis.crypto and globalThis.crypto.subtle. (you can polyfill if neeeded)

Usage

Install package:

# npm
npm install uncrypto

# yarn
yarn add uncrypto

# pnpm
pnpm install uncrypto

Import:

// ESM
import { subtle, randomUUID, getRandomValues } from "uncrypto";

// CommonJS
const { subtle, randomUUID, getRandomValues } = require("uncrypto");

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

FAQs

Last updated on 06 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc