

var argscheck = require('cordova/argscheck'),
    channel = require('cordova/channel'),
    utils = require('cordova/utils'),
    exec = require('cordova/exec'),
    cordova = require('cordova');

channel.createSticky('onCordovaInfoReady');
// Tell cordova channel to wait on the CordovaInfoReady event
channel.waitForInitialization('onCordovaInfoReady');

//Providing properties to mobile
function Encrypt() {
    this.available = false;
    this.platform = null;
    var me = this;

    channel.onCordovaReady.subscribe(function() {
        me.getInfo(function(info) {
            var buildLabel = cordova.version;
            me.available = true;
            me.platform = info.getKey;
            channel.onCordovaInfoReady.fire();
        },function(e) {
            me.available = false;
            utils.alert("[ERROR] Error initializing Cordova: " + e);
        });
    });
}

/**
 * Get device info
 *
 * @param {Function} successCallback The function to call when the heading data is available
 * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
 */
Encrypt.prototype.getInfo = function(successCallback, errorCallback) {
    argscheck.checkArgs('fF', 'Encrypt.getInfo', arguments);
    exec(successCallback, errorCallback, "Encrypt", "getKeyDetails", []);
};

module.exports = new Encrypt();

@@ -1,1302 +1,186 @@
-%0A%0Avar argscheck = require('cordova/argscheck'),%0A    channel = require('cordova/channel'),%0A    utils = require('cordova/utils'),%0A    exec = require('cordova/exec'),%0A    cordova = require('cordova');%0A%0Achannel.createSticky('onCordovaInfoReady');%0A// Tell cordova channel to wait on the CordovaInfoReady event%0Achannel.waitForInitialization('onCordovaInfoReady');%0A%0A//Providing properties to mobile%0Afunction Encrypt() %7B%0A    this.available = false;%0A    this.platform = null;%0A    var me = this;%0A%0A    channel.onCordovaReady.subscribe(function() %7B%0A        me.getInfo(function(info) %7B%0A            var buildLabel = cordova.version;%0A            me.available = true;%0A            me.platform = info.getKey;%0A            channel.onCordovaInfoReady.fire();%0A        %7D,function(e) %7B%0A            me.available = false;%0A            utils.alert(%22%5BERROR%5D Error initializing Cordova: %22 + e);%0A        %7D);%0A    %7D);%0A%7D%0A%0A/**%0A * Get device info%0A *%0A * @param %7BFunction%7D successCallback The function to call when the heading data is available%0A * @param %7BFunction%7D errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)%0A */%0AEncrypt.prototype.getInfo = function(successCallback, errorCallback) %7B%0A    argscheck.checkArgs('fF', 'Encrypt.getInfo', arguments);%0A    exec(successCallback, errorCallback
+cordova.define(%22cordova-plugin-encrypt%22, function(require, exports, module) %7B%0Avar exec = require('cordova/exec');%0A%0Aexports.getKey = function(success, error) %7B%0A    exec(success, error
 , %22E
@@ -196,18 +196,18 @@
 %22get
-KeyDetails
+DeviceInfo
 %22, %5B
@@ -218,36 +218,8 @@
 %7D;%0A%0A
-module.exports = new Encrypt(
+%7D
 );%0A

Update encrypt.js