cryptonyx
TypeScript icon, indicating that this package has built-in type declarations

0.0.2Β β€’Β PublicΒ β€’Β Published

cover npm version npm downloads bundle JSDocs License

πŸ›‘οΈ cryptonyx

πŸ”’ Unified API for cryptographic operations in web and runtime environments, supporting Node.js, browsers, and other platforms

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 needed) βš™οΈπŸ”’

πŸ“ Usage

Install:

# nyxi 
nyxi cryptonyx

# pnpm
pnpm install cryptonyx

# npm
npm install cryptonyx

# yarn
yarn add cryptonyx

Import:

// ESM
import { getRandomValues, randomUUID, subtle } from 'cryptonyx'

// CommonJS
const { subtle, randomUUID, getRandomValues } = require('cryptonyx')

🌱 Development

  • πŸ™ Clone this repository
  • πŸ“₯ Install latest LTS version of Node.js
  • πŸ”§ Enable Corepack using corepack enable
  • πŸ“¦ Install dependencies using nyxi πŸ§™ Always right package manager
  • πŸƒ Run nyxr dev

πŸ“œ License

MIT - Made with πŸ’ž

Readme

Keywords

none

Package Sidebar

Install

npm i cryptonyx

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

9.43 kB

Total Files

11

Last publish

Collaborators

  • dennisollhoff