# @fungible-systems/react-native-expo-crypto

> implementation of crypto for React Native in expo

Latest version **0.0.1** (published 2021-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fungible-systems/react-native-expo-crypto
pnpm add @fungible-systems/react-native-expo-crypto
yarn add @fungible-systems/react-native-expo-crypto
bun add @fungible-systems/react-native-expo-crypto
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-07-31 |
| First published | 2021-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 11 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | Thomas Osmonson |
| Maintainers | aulneau |
| Keywords | react-native, react-component, ios, expo |

## Links

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

## Dependencies (11)

- [pbkdf2](https://npm.io/package/pbkdf2.md) 3.1.2
- [inherits](https://npm.io/package/inherits.md) 2.0.1
- [create-ecdh](https://npm.io/package/create-ecdh.md) 4.0.0
- [create-hash](https://npm.io/package/create-hash.md) 1.1.0
- [create-hmac](https://npm.io/package/create-hmac.md) 1.1.0
- [expo-random](https://npm.io/package/expo-random.md) 11.2.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.0.4
- [browserify-cipher](https://npm.io/package/browserify-cipher.md) 1.0.0
- [typedarray-to-buffer](https://npm.io/package/typedarray-to-buffer.md) 4.0.0

## Recent versions

- 0.0.1 (latest) — 2021-07-31

## README

# @fungible-systems/react-native-expo-crypto

> NOTE: this is a FORK of `https://github.com/themotu/react-native-expo-crypto`, with some modifications to update deps and enable `micro-stacks` usage for expo apps.

---

Note: this module is a clone of [crypto-browserify](https://github.com/crypto-browserify/crypto-browserify), with
randombytes replaced.

A port of node's `crypto` module to React Native.

## install

A typical workflow:

1. Install

  ```sh
  expo add expo-random && yarn add react-native-expo-crypto react-native-expo-bitcoinjs-lib
  ```

## the crypto in this box

What follows is unedited text from crypto-browserify

The goal of this module is to use expo-random for randombytes.

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

If you are interested in writing a feature, please implement as a new module, which will be incorporated into
crypto-browserify as a dependency.

All deps must be compatible with node's crypto
(generate example inputs and outputs with node, and save base64 strings inside JSON, so that tests can run in the
browser. see [sha.js](https://github.com/dominictarr/sha.js)

Crypto is _extra serious_ so please do not hesitate to review the code, and post comments if you do.

## License

MIT

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