All Projects → PeterHdd → cordova-plugin-crypto-file

PeterHdd / cordova-plugin-crypto-file

Licence: Apache-2.0 License
Encrypts source files, works with cordova-plugin-ionic-webview

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to cordova-plugin-crypto-file

Ioniclub
❤️ Ioniclub is hybird mobile app of https://cnodejs.org
Stars: ✭ 35 (+20.69%)
Mutual labels:  cordova, ionic
ionic-3-video-calling-using-webrtc
This is demo code of how to implement video calling in ionic 3 using webrtc
Stars: ✭ 58 (+100%)
Mutual labels:  cordova, ionic
cordova-set-version
CLI and JavaScript API for setting the version in Apache Cordova config.xml
Stars: ✭ 19 (-34.48%)
Mutual labels:  cordova, ionic
ionic-docker
An ionic image for CI
Stars: ✭ 56 (+93.1%)
Mutual labels:  cordova, ionic
example-cordova-code-push-plugin
Ionic + Cordova Code Push Plugin Example
Stars: ✭ 45 (+55.17%)
Mutual labels:  cordova, ionic
ionic-resource-generator
Painless, Offline First, No Dependency, Ionic resources generator
Stars: ✭ 31 (+6.9%)
Mutual labels:  cordova, ionic
travis-ci-ionic-yml
An example configuration of Ionic/cordova + NPM + AngularJS + Android continuous integration setup on Travis CI
Stars: ✭ 21 (-27.59%)
Mutual labels:  cordova, ionic
angular-cordova
Angular wrapper for Cordova
Stars: ✭ 21 (-27.59%)
Mutual labels:  cordova, ionic
Mobile.UP
Mobile.UP
Stars: ✭ 13 (-55.17%)
Mutual labels:  cordova, ionic
bitpocket-mobile-app
Mobile app for accepting bitcoin payments at the point of sale (Bitcoin POS).
Stars: ✭ 26 (-10.34%)
Mutual labels:  cordova, ionic
keyonic-v2
A Keycloak Mobile Implementation using Angular v4 and Ionic v3
Stars: ✭ 23 (-20.69%)
Mutual labels:  cordova, ionic
cordova-plugin-xpay
💰 This is a app payment cordova-plugin, support wechat payment and alipay temporally.
Stars: ✭ 19 (-34.48%)
Mutual labels:  cordova, ionic
ellenorzo
Arisztokréta: Nem hivatalos KRÉTA-kompatibilis ellenőrző alkalmazás
Stars: ✭ 17 (-41.38%)
Mutual labels:  cordova, ionic
cordova-plugin-apkupdater
This plugin allows your Android app to download and install compressed updates without the Google Play Store.
Stars: ✭ 46 (+58.62%)
Mutual labels:  cordova, ionic
mobile-messaging-cordova-plugin
Mobile Messaging SDK plugin for Cordova projects
Stars: ✭ 19 (-34.48%)
Mutual labels:  cordova, ionic
ionic-vue-mobile-template-03
Hybrid app template built with vue, ionic and capacitor.
Stars: ✭ 62 (+113.79%)
Mutual labels:  cordova, ionic
cordova-plugin-amap
Amap Maps plugin for Cordova
Stars: ✭ 51 (+75.86%)
Mutual labels:  cordova, ionic
ionic-hockeyapp
Need HockeyApp in your Ionic application, add this package!
Stars: ✭ 19 (-34.48%)
Mutual labels:  cordova, ionic
v-cupertino
A Vue 3 Wrapper for Cupertino Pane Library
Stars: ✭ 17 (-41.38%)
Mutual labels:  cordova, ionic
cordova-plugin-flurryanalytics
Adds support for all that Flurry Analytics flavored goodness to your Cordova based apps
Stars: ✭ 23 (-20.69%)
Mutual labels:  cordova, ionic

Cordova crypto file plugin

HTML source file is encrypted at build, and decrypted at run.
https://www.npmjs.com/package/cordova-plugin-crypto-file

Add Plugin

cordova plugin add cordova-plugin-crypto-file

Purpose

This plugin was created to solve the issue of using cordova-plugin-ionic-webview with cordova-crypt-file, refer to #75

Important

The file IonicWebViewEngine.java (that is inside the ionic webview plugin) needs to be modified for this plugin to work and for the source code to be encrypted.

Steps:

  1. After adding the cordova-plugin-ionic-webview, navigate to the following location:

For cordova-android@6 :

platforms/android/src/com/ionicframework/cordova/webview/IonicWebViewEngine.java

For cordova-android@7 :

platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java

  1. Remove the following code:
    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
    @Override
    public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
      super.shouldInterceptRequest(view,request);
      return localServer.shouldInterceptRequest(request.getUrl());
    }

    @TargetApi(Build.VERSION_CODES.KITKAT)
    @Override
    public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
      return localServer.shouldInterceptRequest(Uri.parse(url));
    }
  1. Add this instead:
    @Override
    public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
      return super.shouldInterceptRequest(view, request);
    }

Then the plugin will work.

Configuration

You can also change the port in the config.xml, but it needs to be the same port as the one used in the "cordova-plugin-ionic-webview".

To change the port, do the following:

cryptoPort

<preference name="cryptoPort" value="8080" />

Encrypt

cordova build [ios / android]

Decrypt

cordova emulate [ios / android]
or
cordova run [ios / android]

Encryption subjects.

Default

  • .html
  • .htm
  • .js
  • .css

Edit subjects

You can specify the encryption subjects by editing plugin.xml.

plugins/cordova-plugin-crypt-file/plugin.xml

<cryptfiles>
    <include>
        <file regex="\.(htm|html|js|css)$" />
    </include>
    <exclude>
        <file regex="exclude_file\.js$" />
    </exclude>
</cryptfiles>

Specify the target file as a regular expression.

Supported platforms

  • iOS
  • Android
  • CrossWalk

Based on the original cordova-crypt-file created by tkyaji

https://github.com/tkyaji/cordova-plugin-crypt-file

License

Apache version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].