{"id":18841610,"url":"https://github.com/webview-crypto/nativescript-angular-webview-crypto","last_synced_at":"2026-05-10T02:09:25.191Z","repository":{"id":65992247,"uuid":"75252368","full_name":"webview-crypto/nativescript-angular-webview-crypto","owner":"webview-crypto","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-13T17:15:28.000Z","size":6,"stargazers_count":1,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T10:44:22.462Z","etag":null,"topics":["angular-2","nativescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-01T03:42:15.000Z","updated_at":"2024-05-30T17:47:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b5d380d-af7b-4f10-996b-fbab8baec845","html_url":"https://github.com/webview-crypto/nativescript-angular-webview-crypto","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Fnativescript-angular-webview-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Fnativescript-angular-webview-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Fnativescript-angular-webview-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webview-crypto%2Fnativescript-angular-webview-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webview-crypto","download_url":"https://codeload.github.com/webview-crypto/nativescript-angular-webview-crypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239780122,"owners_count":19695734,"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":["angular-2","nativescript"],"created_at":"2024-11-08T02:51:52.139Z","updated_at":"2026-05-10T02:09:25.118Z","avatar_url":"https://github.com/webview-crypto.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nativescript-angular-webview-crypto\n\n[![npm](https://img.shields.io/npm/v/nativescript-angular-webview-crypto.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/nativescript-angular-webview-crypto)\n\nThis brings `window.Crypto` to your Angular2 NativeScript application. It does this\nby communicating with a hidden WebView, which performs the actual\ncomputation.\n\nIt extends [`nativescript-webview-crypto`](https://github.com/saulshanabrook/nativescript-webview-crypto), which in turn extends\n[`webview-crypto`](https://github.com/saulshanabrook/webview-crypto).\n\n*This project is funded by [Burke Software and Consulting LLC](http://burkesoftware.com/) for [passit](http://passit.io/). We are available for hire for any improvement and integration needs on this project. Open an issue to start a conversation or email info @ burke software dot come.*\n\n\n## Install\n\nThis requires being [setup properly with NativeScript](http://docs.nativescript.org/start/quick-setup)\nfirst. Then install this as a plugin:\n\n```bash\ntns plugin add nativescript-angular-webview-crypto\n```\n\n## Usage\n\nRendering the `polyfill-crypto` component will start up a WebView to\ntransparently proxy all the `crypto` calls to. `crypto` is a global variable,\nto match the Web Cryptography API. To register the `polyfill-crypto` component,\njust import this package.\n\n```typescript\nimport { Component, OnInit } from \"@angular/core\";\nimport 'nativescript-angular-webview-crypto';\n\n@Component({\n    selector: \"ns-app\",\n    template: `\n        \u003cpolyfill-crypto\u003e\u003c/polyfill-crypto\u003e\n    `\n })\nexport class AppComponent implements OnInit {\n\tngOnInit() {\n\t\tconst array = new Uint32Array(10);\n\t\tconsole.log(array)\n\t\t// getRandomValues is asynchronous\n\t\t// https://github.com/saulshanabrook/webview-crypto#getrandomvalues\n\t\tcrypto.getRandomValues(array);\n\t\t(array as any)._promise.then(_ =\u003e console.log(array))\n\t}\n}\n\n```\n\nThe component will be hidden, but needs to be rendered for `crypto` to work.\n\nYou can look at an [example repo](https://github.com/saulshanabrook/nativescript-angular-webview-crypto-example)\nrunning [this example for symmetric encryption](https://blog.engelke.com/2014/06/22/symmetric-cryptography-in-the-browser-part-1/)\nin NativeScript.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebview-crypto%2Fnativescript-angular-webview-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebview-crypto%2Fnativescript-angular-webview-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebview-crypto%2Fnativescript-angular-webview-crypto/lists"}