# @react-native-module/crypto

> implementation of crypto for React Native

Latest version **4.1.0** (published 2026-02-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-native-module/crypto
pnpm add @react-native-module/crypto
yarn add @react-native-module/crypto
bun add @react-native-module/crypto
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2026-02-02 |
| First published | 2022-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sacru2red |
| Maintainers | sacru2red |
| Keywords | react native, react-native, crypto, ios, android, web |

## Links

- npm: https://www.npmjs.com/package/@react-native-module/crypto
- Repository: https://github.com/react-native-module/crypto
- Issues: https://github.com/react-native-module/crypto/issues
- npm.io page: https://npm.io/package/@react-native-module/crypto

## Dependencies (9)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1
- [create-ecdh](https://npm.io/package/create-ecdh.md) ^4.0.4
- [create-hash](https://npm.io/package/create-hash.md) ^1.1.0
- [create-hmac](https://npm.io/package/create-hmac.md) ^1.1.0
- [diffie-hellman](https://npm.io/package/diffie-hellman.md) ^5.0.0
- [public-encrypt](https://npm.io/package/public-encrypt.md) ^4.0.0
- [browserify-sign](https://npm.io/package/browserify-sign.md) ^4.2.5
- [browserify-cipher](https://npm.io/package/browserify-cipher.md) ^1.0.0
- [@react-native-module/randombytes](https://npm.io/package/@react-native-module/randombytes.md) ^4.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.1.0 (latest) — 2026-02-02
- 4.0.0-0 (next) — 2022-08-04
- 4.0.1 — 2022-08-04
- 2.2.0 — 2022-08-04
- 2.1.3-12 — 2022-08-04
- 2.1.3-11 — 2022-08-04
- 2.1.3-10 — 2022-08-04
- 2.1.3-9 — 2022-07-25
- 2.1.3-8 — 2022-07-25
- 2.1.3-7 — 2022-07-25
- 2.1.3-6 — 2022-07-25
- 2.1.3-5 — 2022-07-25
- 2.1.3-4 — 2022-07-25
- 2.1.3-3 — 2022-07-25
- 2.1.3-2 — 2022-07-25
- … 4 more at https://npm.io/package/@react-native-module/crypto/versions

## README

# react-native-module/crypto

A port of node's `crypto` module to React Native.
The goal of this module is to reimplement node's crypto module so that it can run in react-native supported environments.
Features and interface must be compatible with node's crypto

this module is a clone of [crypto-browserify](https://github.com/crypto-browserify/crypto-browserify), [react-native-crypto](https://github.com/mvayngrib/react-native-crypto)

## Why use this module and Not others

If your app is running on mobile [android, ios] only, sufficient to use module react-native-crypto
Use this module if you are considering other platforms

## Install

This module has peerDependency "react", "react-native", "@react-native-module/pbkdf2"

A typical workflow:

```
npm i --save @react-native-module/crypto @react-native-module/pbkdf2
```

```
yarn add @react-native-module/crypto @react-native-module/pbkdf2
```

## List of Support node's features

Here is the subset that is currently implemented:

- createHash (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
- createHmac (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
- pbkdf2
- pbkdf2Sync
- randomBytes
- pseudoRandomBytes
- createCipher (aes)
- createDecipher (aes)
- createDiffieHellman
- createSign (rsa, ecdsa)
- createVerify (rsa, ecdsa)
- createECDH (secp256k1)
- publicEncrypt/privateDecrypt (rsa)

## Todo

these features from node's `crypto` are still unimplemented.

- createCredentials

these features would benefit from native implementations

- pbkdf2
- createSign
- createVerify
- createECDH
- publicEncrypto/privateDecrypt (rsa)

## contributions

Thank you for investing your time in contributing to this project!

## License

MIT

---
_Source: https://npm.io/package/@react-native-module/crypto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
