diff --git a/package.json b/package.json index 1405451..07d6a7b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/plugin.xml b/plugin.xml index 0f7eb4e..9f25f54 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,6 +1,6 @@ @@ -44,4 +44,4 @@ - \ No newline at end of file + diff --git a/src/android/SecureKeyStore.java b/src/android/SecureKeyStore.java index cac365a..801ab08 100644 --- a/src/android/SecureKeyStore.java +++ b/src/android/SecureKeyStore.java @@ -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() + "}"); } } @@ -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() + "}"); } } @@ -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() + "}"); } }