# react-native-fast-crypto

> Native C/C++ implemented crypto libraries for React Native apps

Latest version **3.0.0** (published 2025-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-fast-crypto
pnpm add react-native-fast-crypto
yarn add react-native-fast-crypto
bun add react-native-fast-crypto
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2025-10-27 |
| First published | 2017-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 112 |
| Author | Edge |
| Maintainers | swansontec, mattdpiche, samholmes, edgyjontz, paullinator |
| Keywords | react-native, scrypt, fast, native |

## Links

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

## Dependencies (2)

- [buffer](https://npm.io/package/buffer.md) ^5.0.8
- [rfc4648](https://npm.io/package/rfc4648.md) ^1.5.4

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2025-10-27
- 2.2.1 — 2025-07-11
- 2.2.0 — 2022-03-18
- 2.1.1 — 2022-03-16
- 2.1.0 — 2022-03-07
- 2.0.0 — 2020-11-21
- 1.8.3 — 2020-11-20
- 1.8.2 — 2020-10-19
- 1.8.1 — 2019-04-22
- 1.8.0 — 2019-04-03
- 1.7.0 — 2019-03-08
- 1.6.0 — 2018-11-07
- 1.5.6 — 2018-08-16
- 1.5.5 — 2018-03-17
- 1.5.4 — 2018-02-22
- … 17 more at https://npm.io/package/react-native-fast-crypto/versions

## README

# react-native-fast-crypto

This library implements fast, fully native crypto routines for React Native under iOS and Android. Fully built binaries are committed for both platforms but can also be built from scratch.

## Getting started

This library directly supports React Native v0.60+ with autolinking. Simply add react-native-fast-crypto to your application, and React Native will link the necessary native modules into your app.

`npm install react-native-fast-crypto --save`

## Usage

```javascript
import { scrypt } from 'react-native-fast-crypto';

const data = Uint8Array.from([1, 250, 3, 4, 34, 64, 39, 43, 12])
const salt = Uint8Array.from([45, 124, 45, 29, 172, 238, 35])

const result: Uint8Array = await crypto.scrypt(data, salt, 16384, 8, 1, 32)
console.log(result)
```

## Developing

This library relies on native C++ code from other repos. To integrate this code, you must run the following script before publishing this library to NPM:

```sh
npm run build-native
```

This script does the following tasks:

- Download third-party source code (libsecp256k1).
- Compile shared libraries for Android.
- Compile an iOS universal static library and put it into an XCFramework.

The `build-native` script is also the place to make edits when upgrading any of the third-party dependencies.

For this to work, you need:

- A recent Android SDK, installed at `$ANDROID_HOME`
- Xcode command-line tools
- `cmake`, provided by `brew install cmake`
- `llvm-objcopy`, provided by `brew install llvm`

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