# react-native-webview-crypto

> [![npm](https://img.shields.io/npm/v/react-native-webview-crypto?style=flat-square)](https://www.npmjs.com/package/react-native-webview-crypto)

Latest version **0.0.28** (published 2026-01-12) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; has provenance.

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

## Facts

| | |
|---|---|
| Version | 0.0.28 |
| Published | 2026-01-12 |
| First published | 2016-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 75 |
| Maintainers | saulshanabrook, linusu, sirpush |
| Keywords | crypto, webcrypto, cryptography, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-webview-crypto
- Repository: https://github.com/webview-crypto/react-native-webview-crypto
- Homepage: https://github.com/webview-crypto/react-native-webview-crypto#readme
- Issues: https://github.com/webview-crypto/react-native-webview-crypto/issues
- npm.io page: https://npm.io/package/react-native-webview-crypto

## Dependencies (3)

- [encode-utf8](https://npm.io/package/encode-utf8.md) ^1.0.2
- [webview-crypto](https://npm.io/package/webview-crypto.md) ^0.1.14
- [fast-base64-encode](https://npm.io/package/fast-base64-encode.md) ^1.0.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.0.28 (latest) — 2026-01-12
- 0.0.27 — 2025-07-14
- 0.0.26 — 2024-09-18
- 0.0.25 — 2022-08-07
- 0.0.24 — 2021-11-17
- 0.0.23 — 2021-08-18
- 0.0.22 — 2021-05-20
- 0.0.21 — 2020-10-05
- 0.0.20 — 2020-02-13
- 0.0.16 — 2016-08-30
- 0.0.15 — 2016-08-28
- 0.0.14 — 2016-08-24
- 0.0.13 — 2016-08-15
- 0.0.12 — 2016-08-15
- 0.0.11 — 2016-08-15
- … 10 more at https://npm.io/package/react-native-webview-crypto/versions

## README

# react-native-webview-crypto

[![npm](https://img.shields.io/npm/v/react-native-webview-crypto?style=flat-square)](https://www.npmjs.com/package/react-native-webview-crypto)

Working version based on /saulshanabrook/react-native-webview-crypto and PR https://github.com/webview-crypto/react-native-webview-crypto/pull/9

This brings `window.crypto.subtle` to your React Native application. It does this by communicating with a hidden WebView, which performs the actual computation.

Refer to the [`webview-crypto`](https://github.com/webview-crypto/webview-crypto) repo for most of the code and some caveats.

## Installation

```sh
npm install --save react-native-webview react-native-webview-crypto
react-native link
```

### known issues

if you use react-native-crypto and get warnings about cyclic require make sure to import it before the bridge

```
import 'react-native-crypto'
import WebviewCrypto from 'react-native-webview-crypto'
```

### getRandomValues

for complete compatability with webcrypto (window.crypto.getRandomValues) you can install react-native-crytpo or react-native-get-random-values

## Usage

Rendering the `PolyfillCrypto` will start up a WebView to transparently proxy all the crypto calls to.

```javascript
import React, { Component } from 'react'
import { View } from 'react-native'

import App from './app'

import PolyfillCrypto from 'react-native-webview-crypto'

class TopLevelComponent extends Component {
  render() {
    return (
      <View>
        <PolyfillCrypto />
        <App />
      </View>
    )
  }
}

AppRegistry.registerComponent('WhateverName', () => TopLevelComponent)
```

Now, in any of your code, you can access `window.crypto.subtle`, just like you would in a browser.

[Example repo](https://github.com/gooddollar/gun-webcrypto-react-native)
There is also an [example repo](https://github.com/webview-crypto/react-native-webview-crypto-example) which runs some example crypto using this library.

_This project was funded by [Burke Software and Consulting LLC](http://burkesoftware.com/) for [passit](http://passit.io/)._

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