Skip to content

Commit

Permalink
fix wrong field in json string
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeep1991singh committed Jul 1, 2017
1 parent 3d09bef commit 60ff098
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"name": "cordova-plugin-secure-key-store",
"version": "1.5.2",
"version": "1.5.3",
"description": "Cordova plugin for securely saving keys, passwords or strings on devices.",
"cordova": {
"id": "cordova-plugin-secure-key-store",
"platforms": [
"android",
"ios"
]
"platforms": ["android", "ios"]
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-secure-key-store"
version="1.5.2"
version="1.5.3"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">

Expand Down Expand Up @@ -44,4 +44,4 @@
<framework src="Security.framework" />
</platform>

</plugin>
</plugin>
9 changes: 6 additions & 3 deletions src/android/SecureKeyStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ private void encrypt(String alias, String input, CallbackContext callbackContext

} catch (Exception e) {
Log.e(Constants.TAG, "Exception: " + e.getMessage());
callbackContext.error("{\"code\":9,\"api-level\":" + Build.VERSION.SDK_INT + ",\"class\":" + e.getMessage() + "}");
callbackContext.error(
"{\"code\":9,\"api-level\":" + Build.VERSION.SDK_INT + ",\"message\":" + e.getMessage() + "}");
}

}
Expand Down Expand Up @@ -135,7 +136,8 @@ private void decrypt(String alias, CallbackContext callbackContext) {

} catch (Exception e) {
Log.e(Constants.TAG, "Exception: " + e.getMessage());
callbackContext.error("{\"code\":1,\"api-level\":" + Build.VERSION.SDK_INT + ",\"class\":" + e.getMessage() + "}");
callbackContext.error(
"{\"code\":1,\"api-level\":" + Build.VERSION.SDK_INT + ",\"message\":" + e.getMessage() + "}");
}
}

Expand All @@ -147,7 +149,8 @@ private void removeKeyFile(String alias, CallbackContext callbackContext) {

} catch (Exception e) {
Log.e(Constants.TAG, "Exception: " + e.getMessage());
callbackContext.error("{\"code\":6,\"api-level\":" + Build.VERSION.SDK_INT + ",\"class\":" + e.getMessage() + "}");
callbackContext.error(
"{\"code\":6,\"api-level\":" + Build.VERSION.SDK_INT + ",\"message\":" + e.getMessage() + "}");
}
}

Expand Down

0 comments on commit 60ff098

Please sign in to comment.