npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-nitro-crypto

v0.2.3

Published

High-performance Node.js & Web Crypto for React Native, powered by Nitro Modules and Rust. Almost complete coverage of Node.js 24 crypto APIs.

Readme

react-native-nitro-crypto

High-performance Node.js crypto & Web Crypto for React Native, powered by Nitro Modules and Rust.

This library provides a high-performance, cross-platform implementation of both the Node.js crypto API and the standard Web Crypto API, powered by a native Rust backend. It achieves almost complete compatibility with the Node.js 24 crypto module, implementing almost every interface with matching parameters.

🚀 Why Nitro Crypto?

In the React Native ecosystem, react-native-nitro-crypto stands out by merging modern performance with future-proof security:

| Feature | Nitro Crypto | Quick Crypto | Expo Crypto | | :--- | :---: | :---: | :---: | | Engine | Nitro + Rust | JSI + C++ | Native (Java/Swift) | | Node.js 24 Compat | ✅ Full | ✅ Partial | ❌ Minimal | | Web Crypto API | ✅ Full | ❌ Partial | ❌ Partial | | Post-Quantum (PQC) | ✅ Yes | ❌ No | ❌ No | | Performance | Ultra-High | High | Moderate |

Features

  • ⚡️ Nitro-Fast Performance: Leverages Nitro Modules' ultra-low overhead for near-native execution speeds.
  • 🔄 Node.js 24 Compatibility: Implements all interfaces of the Node.js 24 crypto module (Hash, HMAC, Cipher, Sign, DiffieHellman, etc.).
  • 🌐 Web Crypto API: Full support for the standard Web Crypto API (crypto.subtle), identical to modern browsers.
  • 🔐 Post-Quantum Cryptography (PQC): Industry-leading support for next-gen algorithms like ML-DSA (Dilithium) and ML-KEM (Kyber).
  • 🦀 Modern Rust Backend: Built on a memory-safe, high-performance Rust core.
  • 📱 Cross-Platform: Premium support for both iOS and Android.

Installation

npm install react-native-nitro-crypto
# or
yarn add react-native-nitro-crypto

Dependent on react-native-nitro-modules, make sure it is properly configured in your project.

Usage

Node.js Crypto API

You can import react-native-nitro-crypto as a polyfill or use it directly.

import crypto from 'react-native-nitro-crypto';

// Hashing
const hash = crypto.createHash('sha256');
hash.update('Hello World');
console.log(hash.digest('hex'));

// HMAC
const hmac = crypto.createHmac('sha256', 'secret-key');
hmac.update('data to sign');
console.log(hmac.digest('hex'));

// Random Bytes
const random = crypto.randomBytes(16);
console.log(random.toString('hex'));

Web Crypto API

The Web Crypto API is available under crypto.subtle or crypto.webcrypto.subtle.

import { webcrypto } from 'react-native-nitro-crypto';

async function signMessage() {
  const keyPair = await webcrypto.subtle.generateKey(
    {
      name: "ECDSA",
      namedCurve: "P-256",
    },
    true,
    ["sign", "verify"]
  );

  const data = new TextEncoder().encode("Hello World");
  const signature = await webcrypto.subtle.sign(
    {
      name: "ECDSA",
      hash: { name: "SHA-256" },
    },
    keyPair.privateKey,
    data
  );

  console.log(new Uint8Array(signature));
}

Supported Algorithms

This library supports a wide range of algorithms, including:

  • Hashes: SHA-1, SHA-256, SHA-384, SHA-512, MD5, SHA3 family.
  • HMAC: All supported hash algorithms.
  • Symmetric: AES (CBC, CTR, GCM, KW, OCB), ChaCha20-Poly1305.
  • Asymmetric: RSA (OAEP, PSS, PKCS1), ECDSA, ECDH.
  • Modern Curves: Ed25519, X25519, Ed448, X448.
  • Post-Quantum: ML-DSA, ML-KEM.
  • KDF: PBKDF2, HKDF, Scrypt, Argon2.

For a detailed list of implemented APIs and coverage status, please refer to Implementation Coverage.

License

ISC