nativescript-webview-crypto
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

nativescript-webview-crypto

npm Dependency Status

This brings window.Crypto to your Native Script application. It does this by communicating with a hidden WebView, which performs the actual computation.

Refer to the webview-crypto repo for most of the code and some cavaets.

If you are using Angular2 with Nativescript, you should use nativescript-angular-webview-crypto.

This project is funded by Burke Software and Consulting LLC for passit. 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.

Install

This requires being setup properly with NativeScript first. Then install this as a plugin:

tns plugin add nativescript-webview-crypto

Quickstart

Rendering the PolyfillCrypto components will start up a WebView to transparently proxy all the crypto calls to. It will also set the crypto global variable.

<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:WebViewCrypto="nativescript-webview-crypto">
  <WebViewCrypto:WebViewCrypto />
  ...
</Page>

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

You can look at an example repo running this example for symmetric encryption in NativeScript.

Dependencies (2)

Dev Dependencies (2)

Package Sidebar

Install

npm i nativescript-webview-crypto

Weekly Downloads

0

Version

0.1.5

License

MIT

Last publish

Collaborators

  • saulshanabrook
  • linusu
  • sirpush