{"id":18841608,"url":"https://github.com/webview-crypto/react-native-webview-crypto","last_synced_at":"2025-05-05T18:47:47.893Z","repository":{"id":45336516,"uuid":"61405653","full_name":"webview-crypto/react-native-webview-crypto","owner":"webview-crypto","description":"Web Cryptography API for React Native","archived":false,"fork":false,"pushed_at":"2024-09-18T11:24:35.000Z","size":154,"stargazers_count":69,"open_issues_count":2,"forks_count":29,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T17:46:31.829Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webview-crypto.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-17T22:24:31.000Z","updated_at":"2025-02-14T15:42:14.000Z","dependencies_parsed_at":"2022-09-06T00:01:47.775Z","dependency_job_id":null,"html_url":"https://github.com/webview-crypto/react-native-webview-crypto","commit_stats":null,"previous_names":["saulshanabrook/react-native-webview-crypto"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Freact-native-webview-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Freact-native-webview-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Freact-native-webview-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Freact-native-webview-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webview-crypto","download_url":"https://codeload.github.com/webview-crypto/react-native-webview-crypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252556087,"owners_count":21767293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:51:52.113Z","updated_at":"2025-05-05T18:47:47.856Z","avatar_url":"https://github.com/webview-crypto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-webview-crypto\n\n[![npm](https://img.shields.io/npm/v/react-native-webview-crypto?style=flat-square)](https://www.npmjs.com/package/react-native-webview-crypto)\n\nWorking version based on /saulshanabrook/react-native-webview-crypto and PR https://github.com/webview-crypto/react-native-webview-crypto/pull/9\n\nThis brings `window.crypto.subtle` to your React Native application. It does this by communicating with a hidden WebView, which performs the actual computation.\n\nRefer to the [`webview-crypto`](https://github.com/webview-crypto/webview-crypto) repo for most of the code and some caveats.\n\n## Installation\n\n```sh\nnpm install --save react-native-webview react-native-webview-crypto\nreact-native link\n```\n\n### known issues\n\nif you use react-native-crypto and get warnings about cyclic require make sure to import it before the bridge\n\n```\nimport 'react-native-crypto'\nimport WebviewCrypto from 'react-native-webview-crypto'\n```\n\n### getRandomValues\n\nfor complete compatability with webcrypto (window.crypto.getRandomValues) you can install react-native-crytpo or react-native-get-random-values\n\n## Usage\n\nRendering the `PolyfillCrypto` will start up a WebView to transparently proxy all the crypto calls to.\n\n```javascript\nimport React, { Component } from 'react'\nimport { View } from 'react-native'\n\nimport App from './app'\n\nimport PolyfillCrypto from 'react-native-webview-crypto'\n\nclass TopLevelComponent extends Component {\n  render() {\n    return (\n      \u003cView\u003e\n        \u003cPolyfillCrypto /\u003e\n        \u003cApp /\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n\nAppRegistry.registerComponent('WhateverName', () =\u003e TopLevelComponent)\n```\n\nNow, in any of your code, you can access `window.crypto.subtle`, just like you would in a browser.\n\n[Example repo](https://github.com/gooddollar/gun-webcrypto-react-native)\nThere is also an [example repo](https://github.com/webview-crypto/react-native-webview-crypto-example) which runs some example crypto using this library.\n\n_This project was funded by [Burke Software and Consulting LLC](http://burkesoftware.com/) for [passit](http://passit.io/)._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebview-crypto%2Freact-native-webview-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebview-crypto%2Freact-native-webview-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebview-crypto%2Freact-native-webview-crypto/lists"}