GithubHelp home page GithubHelp logo

crypho / cordova-plugin-secure-storage Goto Github PK

View Code? Open in Web Editor NEW
277.0 277.0 267.0 202 KB

Secure storage plugin for Apache Cordova

License: MIT License

Objective-C 43.89% JavaScript 33.32% Java 22.78%

cordova-plugin-secure-storage's People

Contributors

ajayambre avatar demetris-manikas avatar digaus avatar dpa99c avatar embedded-spirit avatar ggozad avatar goshacmd avatar jdart avatar jvjvjv avatar oddcb avatar schaumiii avatar sencenan avatar sgrebnov avatar yyfearth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-secure-storage's Issues

Cannot read property 'native' of null. Warnings and errors.

Hello!
I wanted to try out this plugin in my angularJS cordova application. I wrapped plugin methods in simple service and used it in simple cases of setting/getting string value. Everything works fine but console logs a few warnings:
Error in Success callbackId: SecureStorage1208879459 : TypeError: Cannot read property 'native' of null
in cordova.js:312
Also after this, few errors pop:
TypeError: Cannot read property 'native' of null in securestorage.js:387.
All functionality works fine but I want to get rid of this errors and warning. How can I do that?
Currently I'm working on cordova 6.20 and testing app on Android 5.0.2

"cordova.plugins.SecureStorage is not a constructor"

09-22 18:12:43.521 13324-13324/? I/chromium: [INFO:CONSOLE(65)] "Uncaught TypeError: cordova.plugins.SecureStorage is not a constructor", source: file:///data/user/0/com.adobe.phonegap.app/files/phonegapdevapp/www/js/index.js (65)

i'm pretty new at devloping in phonegap. so any advise would be appreciated.
when i try to create a phonegap storage instance via your walkthrough:

" var ss = new cordova.plugins.SecureStorage(
function () { console.log('Success')},
function (error) { console.log('Error ' + error); },
'my_app');

"

it stops the function and nothing after it is called. strange error though, i would assume the constructor is fine? :S

JellyBean compatibility

Hello,

Is this plugin compatible with Android API Level < 19 ?

Because I get the following exception :

E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-2
java.lang.NoSuchMethodError: android.security.KeyPairGeneratorSpec$Builder.setKeySize
    at com.crypho.plugins.RSA.createKeyPair(RSA.java:43)
    at com.crypho.plugins.SecureStorage$1.run(SecureStorage.java:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    at java.lang.Thread.run(Thread.java:841)

Is there any workaround or patches available to use this plugin on JellyBean ?

App crashes on iOS7

Reference to kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly causes app to crash on iOS7

Secure Storage is undefined?

My code works great on iOS, with getting and setting items. However, I get SecureStorage is undefined when I run the same code on Android 4.4 with Crosswalk 15 and with Cordova 5.1.1?

Here's my code:

document.addEventListener("deviceready", function() {
var ss = new cordova.plugins.SecureStorage(
function () {},
function (error) { console.log('Error ' + error); },
'YourChurch');
},false);

It set I needed to set a security PIN, so I figured that at least part of the library must have been loaded correctly?

Storing objects should either be supported cross-platform or not supported on Android

Hi,

It seems like that storing objects as a value works on Android, even though it shouldn't be supported.

One of our developers implemented the plugin on Android platform, but it failed testing on iOS due to the underlying issue. Looks like the cordova plugin is not capable of type checking on .set() and does not use NSDictionary behind the scenes in SAMKeychain library.

So, I'd suggest to implement a type checking and deny the use of objects whatsoever, especially since readme document only mention strings across the board.

Yet to test this on UWP.

Obviously, a quick workaround is to use JSON.stringify() and JSON.parse() for the value, which works perfectly.

Thanks!

Why is the extra complexity of the AES encryption in Android

Hi,
Is there a reason for adding the extra AES encryption (on Adnroid)?
As I see it, the actual values could be encrypted/decrypted using the RSA one (from the keystore) - removing extra AES enc/dec cycle and reducing code complexity.

Thanks for your reply and for this useful library.

question regarding Keys

Thanks again for building this.

Is it safe to have the Key be a string in our app's javascript code?
i.e. if the key is "password" and I store the user's password in the value, does that make it easier for someone to hack the password if the phone is compromised?

And is someone able to look at the list of "keys"?
Thank you!

Android question: how to keep data in storage even when app is deleted

Hi,

Firstly thanks for your work for this plugin.
It works perfectly for iOS, as data is stored in keychain regardless the app is deleted.

However, as you mention in README file, data is encrypted and stored in localStorage only in case of Android. It means that data will be deleted when you remove app.
Is there any way so that this plugin can do the same logic as iOS?

Thanks in advance.

Android 5.1.1 - Appending "_SS_" value with the key.

Android 5.1.1 i have observed an issue from javascript passed key value "test/user" but i am getting an error message like "error: Error: Key [_SS_test/user] not found. ". Seems inside the android native code it's appending "SS" value with the key value.

Gettinf "Failed to Load Error"

Hi Team,

I am using Samsunf 4.1 device & i am getting below error

KeyStore.PrivateKeyEntry keyEntry = getKeyStoreEntry(alias);
if (keyEntry == null) {
throw new Exception("Failed to load key for " + alias);
}

Android and iOS Min Version

Hi,

Congrats for the plugin! We are finding it very useful :)

Can you tell us which is the min version for Android and iOS this plugin supports?

EDIT:

Ok, I see in your code that min version for Android is API 19, which is quite new, so lot of devices are left out for the use of this plugin. is this min version mandatory?

EDIT2:

I've tried to replace the min version the plugin is setting up to the app with:

    <gap:config-file platform="android" parent="/manifest" mode="replace">
         <uses-sdk   android:minSdkVersion="14" android:targetSdkVersion="14"/>
   </gap:config-file>

But I have no luck. Do you know any other way to overcome this problem?

EDIT3:

I have also tried this, but with the same result :(

    <preference name="android-targetSdkVersion" value="14" />
    <preference name="android-minSdkVersion" value="14" />

Thanks

cordova_not_available

I'm using ionic2 and when I try to create the store, always appears this error:

cordova_not_available

This happens in the browser also in the app installed.

Do you have any idea?

Android keystore deletion on security setting change

Changing the lock screen type on Android erases the keystore (issues 61989 and 210402). The author of the second issue also describes it in the Android Security: The Forgetful Keystore blog post. This means that the keystore can only be used as a credential cache and not persistent storage.

This issue also exists in Android 6.0 for keys that require encryption. Details from Android Keystore Changes:

Keys which do not require encryption at rest will no longer be deleted when secure lock screen is disabled or reset (for example, by the user or a Device Administrator). Keys which require encryption at rest will be deleted during these events.

I assume this means that keys stored using the plugin on Android will be lost if the user changes their lock screen type, is this correct? If so, this should probably be mentioned explicitly in the documentation.

Is it possible to use this plugin and iOS keychain to automatically login to Cordova app?

I'm looking for a possible solution to login to a Cordova iOS app automatically using the iOS keychain.

Is this possible? Can this plugin help?

I've tried looking at Shazron's KeychainPlugin, but his example only shows playing with getting, setting and deleting the keys for predefined values.

How can this plugin use the values in the keychain already? Is there a simple example of how this can be done? I can't find this info anywhere. At least not for a Cordova project.

Any help would be great!

Android secureDevice

@ggozad I am trying to figure out when, or I guess how this functionality disappeared. On our application running on Android with an insecure device we used to get prompted to secure our device (I assume this happened in the unlockCredentials method in SecureStorage.java). In the init method I notice there is an else if statement that would potentially run this code if the initial if statement didn't return false (line 77 of SecureStorage.java). I also, now notice for the android version I can potentially just force a call to this secureDevice method that appears like it'll call the unlockCredentials call. Am I missing something or did this method used to fire in the past and get updated somewhere along the way? What is the recommended way of invoking this message?

iOS synchronization?

Can we assumed data stored using the plugin will be synchronized between iOS devices sharing the same Apple ID? (I know KeyChain allows this)...

The documentation doesn't mention whether or not synchronization is enabled, and/or possible to setup.

Thanks!

Set returns an error

Hello All,

Trying to save it using the simulator but I get always this error.

Error: Failure in SecureStorage.set() - Refer to SecBase.h for description

What to do?

App Crash on Android 4.3, Galaxy S3

Hi,

I encountered an app crash on a Galaxy S3. The device was secured with a pattern and in a second test run with a pin code, both runs led to this crash:

W/dalvikvm( 8505): threadid=34: thread exiting with uncaught exception (group=0x41c63700)
E/AndroidRuntime( 8505): FATAL EXCEPTION: pool-1-thread-2
E/AndroidRuntime( 8505): java.lang.NoSuchMethodError: android.security.KeyPairGeneratorSpec$Builder.setKeySize
E/AndroidRuntime( 8505):        at com.crypho.plugins.RSA.createKeyPair(RSA.java:43)
E/AndroidRuntime( 8505):        at com.crypho.plugins.SecureStorage$1.run(SecureStorage.java:45)
E/AndroidRuntime( 8505):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
E/AndroidRuntime( 8505):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
E/AndroidRuntime( 8505):        at java.lang.Thread.run(Thread.java:841)
I/ActivityManager( 2398): Notify an ApplicationCrash
I/SurfaceFlinger( 1947): id=1045 Removed NainActivit (4/5)
I/SurfaceFlinger( 1947): id=1045 Removed NainActivit (-2/5)
I/dumpstate( 8686): begin
F/libc    ( 8688): Fatal signal 13 (SIGPIPE) at 0x000021f0 (code=0), thread 8688 (uptime)
I/DEBUG   ( 1940): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1940): Build fingerprint: 'samsung/m0xx/m0:4.3/JSS15J/I9300XXUGNA5:user/release-keys'
I/DEBUG   ( 1940): Revision: '12'
I/DEBUG   ( 1940): pid: 8688, tid: 8688, name: uptime  >>> uptime <<<
I/DEBUG   ( 1940): signal 13 (SIGPIPE), code -6 (SI_TKILL), fault addr --------
W/NativeCrashListener( 2398): Couldn't find ProcessRecord for pid 8688
I/DEBUG   ( 1940):     r0 ffffffe0  r1 404a9020  r2 00000055  r3 00000888
I/DEBUG   ( 1940):     r4 4010c170  r5 404a9020  r6 00000055  r7 00000004
I/DEBUG   ( 1940):     r8 00001000  r9 00000000  sl 4011b89c  fp 0000000c
I/DEBUG   ( 1940):     ip 4010fd8c  sp be9fd908  lr 400e42ad  pc 400df29c  cpsr 20000010
I/DEBUG   ( 1940):     d0  487adf131aef36cd  d1  0003eb7c02a108e8
I/DEBUG   ( 1940):     d2  40f18cd73aeb80a8  d3  410f5be251eb851f
I/DEBUG   ( 1940):     d4  0000000000000000  d5  0000000000000000
I/DEBUG   ( 1940):     d6  0000000000000000  d7  000118cd00000000
I/DEBUG   ( 1940):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 1940):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 1940):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 1940):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 1940):     d16 41baef36cd000000  d17 40f18cd000000000
I/DEBUG   ( 1940):     d18 41cdcd6500000000  d19 0000000000000000
I/DEBUG   ( 1940):     d20 0000000000000000  d21 0000000000000000
I/DEBUG   ( 1940):     d22 0000000000000000  d23 0000000000000000
I/DEBUG   ( 1940):     d24 0000000000000000  d25 0000000000000000
I/DEBUG   ( 1940):     d26 0000000000000000  d27 0000000000000000
I/DEBUG   ( 1940):     d28 0000000000000000  d29 0000000000000000
I/DEBUG   ( 1940):     d30 0000000000000000  d31 0000000000000000
I/DEBUG   ( 1940):     scr 00000010
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): backtrace:
I/DEBUG   ( 1940):     #00  pc 0001b29c  /system/lib/libc.so (write+12)
I/DEBUG   ( 1940):     #01  pc 000202ab  /system/lib/libc.so (__sflush+54)
I/DEBUG   ( 1940):     #02  pc 00020137  /system/lib/libc.so (fclose+54)
I/DEBUG   ( 1940):     #03  pc 0000d3c5  /system/lib/libc.so
I/DEBUG   ( 1940):     #04  pc 0000e900  /system/lib/libc.so (pthread_once+108)
I/DEBUG   ( 1940):     #05  pc 0000db43  /system/lib/libc.so (malloc_debug_fini+10)
I/DEBUG   ( 1940):     #06  pc 00024639  /system/lib/libc.so (__cxa_finalize+156)
I/DEBUG   ( 1940):     #07  pc 000248f1  /system/lib/libc.so (exit+6)
I/DEBUG   ( 1940):     #08  pc 0000dc51  /system/lib/libc.so (__libc_init+52)
I/DEBUG   ( 1940):     #09  pc 000051f8  /system/bin/toolbox
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): stack:
I/DEBUG   ( 1940):          be9fd8c8  00000000
I/DEBUG   ( 1940):          be9fd8cc  00000000
I/DEBUG   ( 1940):          be9fd8d0  00000000
I/DEBUG   ( 1940):          be9fd8d4  00000000
I/DEBUG   ( 1940):          be9fd8d8  00000000
I/DEBUG   ( 1940):          be9fd8dc  00000000
I/DEBUG   ( 1940):          be9fd8e0  00000000
I/DEBUG   ( 1940):          be9fd8e4  00000000
I/DEBUG   ( 1940):          be9fd8e8  61642032
I/DEBUG   ( 1940):          be9fd8ec  202c7379
I/DEBUG   ( 1940):          be9fd8f0  353a3730
I/DEBUG   ( 1940):          be9fd8f4  35313a36
I/DEBUG   ( 1940):          be9fd8f8  4010c170  /system/lib/libc.so
I/DEBUG   ( 1940):          be9fd8fc  404a9020  [heap]
I/DEBUG   ( 1940):          be9fd900  df0027ad
I/DEBUG   ( 1940):          be9fd904  00000000
I/DEBUG   ( 1940):     #00  be9fd908  4010c170  /system/lib/libc.so
I/DEBUG   ( 1940):          ........  ........
I/DEBUG   ( 1940):     #01  be9fd908  4010c170  /system/lib/libc.so
I/DEBUG   ( 1940):          be9fd90c  00000008
I/DEBUG   ( 1940):          be9fd910  4010fd8c
I/DEBUG   ( 1940):          be9fd914  400e413b  /system/lib/libc.so (fclose+58)
I/DEBUG   ( 1940):     #02  be9fd918  4010c11c  /system/lib/libc.so
I/DEBUG   ( 1940):          be9fd91c  400d13b1  /system/lib/libc.so
I/DEBUG   ( 1940):          be9fd920  00000000
I/DEBUG   ( 1940):          be9fd924  400d13c9  /system/lib/libc.so
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near r1:
I/DEBUG   ( 1940):     404a9000 00000000 0000001b 4010c064 4010c064
I/DEBUG   ( 1940):     404a9010 400d29e9 400d34a1 400d29f9 0000100b
I/DEBUG   ( 1940):     404a9020 74207075 3a656d69 64203320 2c737961
I/DEBUG   ( 1940):     404a9030 3a333020 323a3435 69202c31 20656c64
I/DEBUG   ( 1940):     404a9040 656d6974 2032203a 73796164 3332202c
I/DEBUG   ( 1940):     404a9050 3a31323a 202c3233 65656c73 69742070
I/DEBUG   ( 1940):     404a9060 203a656d 61642032 202c7379 353a3730
I/DEBUG   ( 1940):     404a9070 35313a36 73696d0a 6f6e0a63 09766564
I/DEBUG   ( 1940):     404a9080 75626564 0a736667 65646f6e 6f730976
I/DEBUG   ( 1940):     404a9090 73666b63 646f6e0a 75097665 73666273
I/DEBUG   ( 1940):     404a90a0 646f6e0a 70097665 66657069 6f6e0a73
I/DEBUG   ( 1940):     404a90b0 09766564 6e6f6e61 6f6e695f 73666564
I/DEBUG   ( 1940):     404a90c0 646f6e0a 64097665 74707665 65090a73
I/DEBUG   ( 1940):     404a90d0 0a327478 74786509 65090a33 0a347478
I/DEBUG   ( 1940):     404a90e0 65646f6e 61720976 0a73666d 61667609
I/DEBUG   ( 1940):     404a90f0 6d090a74 736f6473 646f6e0a 65097665
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near r4:
I/DEBUG   ( 1940):     4010c150 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010c160 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010c170 404a9020 00000000 00001000 00010888
I/DEBUG   ( 1940):     4010c180 404a9020 00001000 00000000 4010c170
I/DEBUG   ( 1940):     4010c190 400e5e5f 400e5de1 400e5e3b 400e5e03
I/DEBUG   ( 1940):     4010c1a0 4010c23c 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010c1b0 00000000 00000000 00000000 00001000
I/DEBUG   ( 1940):     4010c1c0 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010c1d0 0002000a 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010c1e0 4010c1c4 400e5e5f 400e5de1 400e5e3b
I/DEBUG   ( 1940):     4010c1f0 400e5e03 4010c24c 00000000 00000000
I/DEBUG   ( 1940):     4010c200 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010c210 00000000 00000000 00000000 ffffffff
I/DEBUG   ( 1940):     4010c220 00000000 00000011 4010f39c 00000000
I/DEBUG   ( 1940):     4010c230 00000000 00000000 00004000 00000000
I/DEBUG   ( 1940):     4010c240 00000000 00000000 00004000 00000000
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near r5:
I/DEBUG   ( 1940):     404a9000 00000000 0000001b 4010c064 4010c064
I/DEBUG   ( 1940):     404a9010 400d29e9 400d34a1 400d29f9 0000100b
I/DEBUG   ( 1940):     404a9020 74207075 3a656d69 64203320 2c737961
I/DEBUG   ( 1940):     404a9030 3a333020 323a3435 69202c31 20656c64
I/DEBUG   ( 1940):     404a9040 656d6974 2032203a 73796164 3332202c
I/DEBUG   ( 1940):     404a9050 3a31323a 202c3233 65656c73 69742070
I/DEBUG   ( 1940):     404a9060 203a656d 61642032 202c7379 353a3730
I/DEBUG   ( 1940):     404a9070 35313a36 73696d0a 6f6e0a63 09766564
I/DEBUG   ( 1940):     404a9080 75626564 0a736667 65646f6e 6f730976
I/DEBUG   ( 1940):     404a9090 73666b63 646f6e0a 75097665 73666273
I/DEBUG   ( 1940):     404a90a0 646f6e0a 70097665 66657069 6f6e0a73
I/DEBUG   ( 1940):     404a90b0 09766564 6e6f6e61 6f6e695f 73666564
I/DEBUG   ( 1940):     404a90c0 646f6e0a 64097665 74707665 65090a73
I/DEBUG   ( 1940):     404a90d0 0a327478 74786509 65090a33 0a347478
I/DEBUG   ( 1940):     404a90e0 65646f6e 61720976 0a73666d 61667609
I/DEBUG   ( 1940):     404a90f0 6d090a74 736f6473 646f6e0a 65097665
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near r8:
I/DEBUG   ( 1940):     00000fe0 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00000ff0 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001000 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001010 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001020 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001030 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001040 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001050 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001060 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001070 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001080 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     00001090 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     000010a0 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     000010b0 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     000010c0 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):     000010d0 ffffffff ffffffff ffffffff ffffffff
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near sl:
I/DEBUG   ( 1940):     4011b87c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b88c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b89c 4006a000 00000001 00000000 00000000
I/DEBUG   ( 1940):     4011b8ac 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b8bc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b8cc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b8dc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b8ec 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b8fc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b90c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b91c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b92c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b93c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b94c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b95c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4011b96c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near ip:
I/DEBUG   ( 1940):     4010fd6c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fd7c 00000000 00000000 00000000 00000001
I/DEBUG   ( 1940):     4010fd8c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fd9c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fdac 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fdbc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fdcc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fddc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fdec 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fdfc 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fe0c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fe1c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fe2c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fe3c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fe4c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):     4010fe5c 00000000 00000000 00000000 00000000
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): memory near sp:
I/DEBUG   ( 1940):     be9fd8e8 61642032 202c7379 353a3730 35313a36
I/DEBUG   ( 1940):     be9fd8f8 4010c170 404a9020 df0027ad 00000000
I/DEBUG   ( 1940):     be9fd908 4010c170 00000008 4010fd8c 400e413b
I/DEBUG   ( 1940):     be9fd918 4010c11c 400d13b1 00000000 400d13c9
I/DEBUG   ( 1940):     be9fd928 4010ebe8 400d2904 4006a000 4006a018
I/DEBUG   ( 1940):     be9fd938 00000001 400d1b47 00000000 400e863b
I/DEBUG   ( 1940):     be9fd948 000000d5 4006a024 00000000 400d5b41
I/DEBUG   ( 1940):     be9fd958 4006b7c4 00000000 00000031 00000000
I/DEBUG   ( 1940):     be9fd968 be9fd9cc 00000001 4010bfd8 40051345
I/DEBUG   ( 1940):     be9fd978 00000000 00000000 be9fd9bc 400e88f5
I/DEBUG   ( 1940):     be9fd988 00000000 400d1c55 00000000 00000000
I/DEBUG   ( 1940):     be9fd998 00000000 00000000 00000000 400511fc
I/DEBUG   ( 1940):     be9fd9a8 4006b7b4 4006b7bc 4006b7c4 be9fd9c0
I/DEBUG   ( 1940):     be9fd9b8 00000000 400b3849 00000001 be9fdac1
I/DEBUG   ( 1940):     be9fd9c8 00000000 be9fdac8 be9fdb05 be9fdb2d
I/DEBUG   ( 1940):     be9fd9d8 be9fdb40 be9fdb55 be9fdb70 be9fdb83
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): code around pc:
I/DEBUG   ( 1940):     400df27c e1a0700c e3700a01 912fff1e e2600000
I/DEBUG   ( 1940):     400df28c ea008358 e1a0c007 e3a07004 ef000000
I/DEBUG   ( 1940):     400df29c e1a0700c e3700a01 912fff1e e2600000
I/DEBUG   ( 1940):     400df2ac ea008350 e1a0c00d e92d00f0 e89c0070
I/DEBUG   ( 1940):     400df2bc e3a070b4 ef000000 e8bd00f0 e3700a01
I/DEBUG   ( 1940):     400df2cc 912fff1e e2600000 ea008346 e1a0c00d
I/DEBUG   ( 1940):     400df2dc e92d00f0 e89c0070 e3a070b5 ef000000
I/DEBUG   ( 1940):     400df2ec e8bd00f0 e3700a01 912fff1e e2600000
I/DEBUG   ( 1940):     400df2fc ea00833c e1a0c007 e3a07005 ef000000
I/DEBUG   ( 1940):     400df30c e1a0700c e3700a01 912fff1e e2600000
I/DEBUG   ( 1940):     400df31c ea008334 e1a0c007 e59f7014 ef000000
I/DEBUG   ( 1940):     400df32c e1a0700c e3700a01 912fff1e e2600000
I/DEBUG   ( 1940):     400df33c ea00832c 00000142 e1a0c007 e3a07006
I/DEBUG   ( 1940):     400df34c ef000000 e1a0700c e3700a01 912fff1e
I/DEBUG   ( 1940):     400df35c e2600000 ea008323 e1a0c007 e3a07013
I/DEBUG   ( 1940):     400df36c ef000000 e1a0700c e3700a01 912fff1e
I/DEBUG   ( 1940):
I/DEBUG   ( 1940): code around lr:
I/DEBUG   ( 1940):     400e428c 68260799 bf086025 ebc56961 bf180606
I/DEBUG   ( 1940):     400e429c 60a12100 6ae3e00f 69e04629 47984632
I/DEBUG   ( 1940):     400e42ac dc062800 f04289a2 81a00040 30fff04f
I/DEBUG   ( 1940):     400e42bc 1a36bd70 2e00182d e7dcdced 4a0b4b0a
I/DEBUG   ( 1940):     400e42cc b570447b 589b4604 461d6819 f00ab109
I/DEBUG   ( 1940):     400e42dc 4620fd82 ffc8f7ff 68284606 4620b110
I/DEBUG   ( 1940):     400e42ec fd86f00a bd704630 00027d08 ffffff60
I/DEBUG   ( 1940):     400e42fc b5704b13 4604447b 4812b928 e8bd4478
I/DEBUG   ( 1940):     400e430c f0004070 4a10bfe5 6819589b b109461e
I/DEBUG   ( 1940):     400e431c fd61f00a f00089a0 b9350518 fe08f7f3
I/DEBUG   ( 1940):     400e432c 35fff04f 60022209 4620e003 ff9cf7ff
I/DEBUG   ( 1940):     400e433c 68334605 4620b113 fd5af00a bd704628
I/DEBUG   ( 1940):     400e434c 00027cd4 ffffffbd ffffff60 46034a0a
I/DEBUG   ( 1940):     400e435c 447a490a 68115852 6842b959 60411e51
I/DEBUG   ( 1940):     400e436c da012900 bbcef001 f8126802 601a0b01
I/DEBUG   ( 1940):     400e437c f0014770 bf00b811 00027c76 ffffff60
I/DEBUG   ( 1940): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 8688

phonegap build plugin id

Hi,
We are using phonegap build with angularjs for one of our hybrid apps.

We are trying to integrate the plugin using this version https://build.phonegap.com/plugins/3403 and we are getting the same issue as in #13 because the plugin id in securestorage.js is not correct:
var sjcl_ss = cordova.require('com.crypho.plugins.securestorage.sjcl_ss') where it should be
var sjcl_ss = cordova.require('com.m2phear.plugins.securestorage.sjcl_ss')

Is there any chance the phonegap plugin will be updated any time soon? any alternatives?

Thanks in advance

ios: multiple calls at the same, only the last one's callback is executed

I've found this behaviour in my main app and have also managed to reproduce it in a minimal cordova app. All of this is executed after the deviceReady event.

Now these calls are supposed to fail, because there is no data in the keychain yet:

 window.secureStorage = new cordova.plugins.SecureStorage(
     function() {
         console.log('Securestorage init success.');

         console.log('securestorage get 1');
         window.secureStorage.get(function success(value) {
             console.log('secure get success', value);
         }, function failure(err) {
             console.log('Secure get failed', err);
         }, 'test');

         console.log('securestorage get 2');
         window.secureStorage.get(function success(value) {
             console.log('secure get 2 success', value);
         }, function failure(err) {
             console.log('Secure get 2 failed', err);
         }, 'test2');

         console.log('securestorage get 3');
         window.secureStorage.get(function success(value) {
             console.log('secure get 3 success', value);
         }, function failure(err) {
             console.log('Secure get 3 failed', err);
         }, 'test3');
     },
     function(error) {
         console.log('Securestorage init error ', error);

     },
     'demo');

The output I receive however, is:

[Log] Securestorage init success. (console-via-logger.js, line 173)
[Log] securestorage get 1 (console-via-logger.js, line 173)
[Log] securestorage get 2 (console-via-logger.js, line 173)
[Log] securestorage get 3 (console-via-logger.js, line 173)
[Log] Secure get 3 failed – "Failure in SecureStorage.get() - errSecItemNotFound" (console-via-logger.js, line 173)

Now let's say I want to store some values in the keychain, which should succeed:

 window.secureStorage = new cordova.plugins.SecureStorage(
     function() {
         console.log('Securestorage init success.');

         console.log('securestorage set 1');
         window.secureStorage.set(function success(value) {
             console.log('secure set success', value);
         }, function failure(err) {
             console.log('Secure set failed', err);
         }, 'test', 'value1');

         console.log('securestorage set 2');
         window.secureStorage.set(function success(value) {
             console.log('secure set 2 success', value);
         }, function failure(err) {
             console.log('Secure set 2 failed', err);
         }, 'test2', 'value2');

         console.log('securestorage set 3');
         window.secureStorage.set(function success(value) {
             console.log('secure set 3 success', value);
         }, function failure(err) {
             console.log('Secure set 3 failed', err);
         }, 'test3', 'value2');
     },
     function(error) {
         console.log('Securestorage init error ', error);

     },
     'demo');

The calls succeed, but the pattern is the same as before, the success callback is only executed for the last one:

[Log] Securestorage init success. (console-via-logger.js, line 173)
[Log] securestorage set 1 (console-via-logger.js, line 173)
[Log] securestorage set 2 (console-via-logger.js, line 173)
[Log] securestorage set 3 (console-via-logger.js, line 173)
[Log] secure set 3 success – "test" (console-via-logger.js, line 173)

There must be some problems with processing those requests in separate threads.

Extra uses-sdk entry getting added to AndroidManifest.xml

Hello,

It appears this entry in your plugin.xml file is causing ionic to append an extra uses-sdk entry in the AndroidManifest.xml file.

    <config-file target="AndroidManifest.xml" parent="/manifest">
        <uses-sdk   android:minSdkVersion="19" android:targetSdkVersion="19"/>
    </config-file>

After performing an ionic build, we end up with this in our manifest file which causes all android builds to fail since there's a project level version support configuration and the one this plugin injects.

uses-sdk android:minSdkVersion="19" android:targetSdkVersion="22"
uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19"

Is there another way to document this dependency to prevent this the injection?

ss.get error

Using android: when I perform a ss.get (immediately after ss.set) I get the keystore without issue. If i then close the app and open it up, then try to perform that same ss.get (having not performed a ss.remove), I recieve this error:

"nonce must have length from 7 to 13 octets"

Error: nonce must have length from 7 to 13 octets
at fail (file:///android_asset/www/plugins/cordova-plugin-secure-storage/www/securestorage.js:59:45)
at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:295:52)
at processMessage (file:///android_asset/www/cordova.js:1081:17)
at processMessages (file:///android_asset/www/cordova.js:1104:9)
at pollOnce (file:///android_asset/www/cordova.js:973:9)
at pollOnceFromOnlineEvent (file:///android_asset/www/cordova.js:960:5)"

I'm having a hard time figuring out the reason for this error. If the keystore didn't exist any longer, wouldn't I receive a different error?

cordova.plugins.SecureStorage is not a function??

Hi

I just installed the plugin, and have an error cordova.plugins.SecureStorage is not a function, not sure why is this happening.

 var ss = new SecureStorage(
function () { alert('Success')},
function (error) { alert('Error ' + error); },
'my_app');

Storage is not persistent after closing the app

I am able to use the plugin to successfully store and retrieve data on an Android device while the app is running. If i try and close the app out and reopen it the data is no longer found.

Is there a way to get all keys of one namespaced storage?

For localStorage we can use Object.keys(localStorage) to get keys of all stored entries.
But this plugin seem like does not have this function.

Another important function might be needed is clear() since iOS never clean up keychain items even after app been uninstalled. But if I can get all the keys, I can implement that easily.

Update: seems like implement reset/clear function natively is much easier than enumerate stored keys.

iOS10 Support?

Curious if anyone has looked into iOS 10 support for this plugin.

I tested this out for the first time today and I am seeing this error when calling cordovaSecureStorage.set

message: "Failure in SecureStorage.set() - errSecDefault"

I will continue looking into this to see if I can find more information and will pass along any findings

EDIT: This seems to affect all setting and fetching

Is there a way to 'remove all' or 'clear' storage?

As the title says, I'm looking for a way to 'clear' the storage - either by destroying the one that exists or wiping out all the values from it. Is that possible?

(I'm aware that in its current form the answer is no, I'm more curious about whether it can be made to happen)

Sharringon iOS

it it possible to share the keychain with 2 Apps if both apps have provisioning based on the same bundle seed ID?

Device is not secure

I am getting this error on android when trying to use the plugin, "Device is not secure",
Here is my implementation:
`
import { SecureStorage } from 'ionic-native';
import {Constants} from '../../model/Constants';

export class SecStorage {

static instance: SecStorage;
static isCreating: Boolean = false;
private secureStorage: SecureStorage;

public static LOGGED = "LOGGED";
public static TokenId = "TOKEN_ID";

constructor() {
    if (!SecStorage.isCreating) {
        throw new Error("You can't call new in Singleton instances!");
    }
}

static getInstance() {
    if (SecStorage.instance == null) {
        SecStorage.isCreating = true;
        SecStorage.instance = new SecStorage();
        SecStorage.instance.init();
        SecStorage.isCreating = false;
    }

    console.log("INSTANCE -> " + SecStorage.instance);
    return SecStorage.instance;
}

private init() {
  ;debugger
    this.secureStorage = new SecureStorage();
      ;debugger
    this.secureStorage.create(Constants.SECURE_STORAGE_KEY)
        .then(
        () => console.log('*SECURE STORAGE SUCCESS*'),
        error => console.log("*SECURE STORAGE ERROR*" + error)
        );
}

getValue(key) {
    return this.secureStorage.get(key);
}

setValue(key, value) {
    this.secureStorage.set(key, value)
        .then(
        data => console.log(data),
        error => console.log(error)
        );
}

removeValue(key) {
    this.secureStorage.remove(key);
    // .then(
    // data => console.log(data),
    // error => console.log(error)
    // );
}

}
`

Can i Know what is wrong ?

Code Sync issue after plugin installation

I have no idea whether this issue is exactly issue of this plugin or not. But since I am facing this issue after installing plugin, I wanna know the fix:

I have phone gap folder which has folder www and it had certain html, js files. After that I added android platform, in result android folder got created under platforms folder.

After that I added some files to android folder. Everything was fine till I install this plugin under phonegap folder.

As soon as this plugin got installed, I lost android specific files under android folder.

I am wondering what could be the issue and trying to recover files. Please help me.

ios: Keychain access denied when launched from notification

I'm using the plugin to store a login token for my app. For iOS i use the keychain mode "WhenUnlockedThisDeviceOnly". When the app is terminated and launched through a notification, I immediately use the plugin to get the token from the Keychain, but it always fails with the error "errSecInteractionNotAllowed".

This is the Code that i use for launching the app on notification (different plugin):

- (void)didReceiveLocalNotification:(NSNotification *)notification
{
    if ([UIApplication sharedApplication].applicationState == UIApplicationStateInactive) {
        UILocalNotification *localNotification = notification.object;
        if (localNotification) {
            [self forwardLocalNotification:localNotification];
        }
    }
}

- (void)forwardLocalNotification:(UILocalNotification *)localNotification
{
    NSDictionary *dict = [NSDictionary dictionaryWithObject:[NSArray arrayWithObject:localNotification.userInfo] forKey:@"notifications"];

    [self sendSuccessfulMessageBackToJSWithData:dict andCallbackId:notificationListenerCallbackId alive:YES];
    if (isBadgingEnabled) {
        [UIApplication sharedApplication].applicationIconBadgeNumber -= 1;
    }
}

-(void)sendSuccessfulMessageBackToJSWithData:(NSDictionary *)jsonObj andCallbackId:(NSString *)callbackId alive:(BOOL)isAlive
{
    // Create an instance of CDVPluginResult, with an OK status code.
    // Set the return message as the Dictionary object (jsonObj) to be serialized as JSON in the browser
    CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:jsonObj];
    [pluginResult setKeepCallbackAsBool:isAlive];

    // Execute sendPluginResult on this plugin's commandDelegate, passing in the instance of CDVPluginResult
    [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
}

no exported member 'SecureStorage'.

Hello there!

I am using cordova secure storage on my ionic 2 app,

I got this error:

TypeScript error: /Users/endriazizi/Documents/Project/app/app/pages/oauth/oauth.
service.ts(7,10): Error TS2305: Module '"/Users/endriazizi/Documents/Project/app
/node_modules/ionic-native/dist/index"' has no exported member 'SecureStorage'.                 
TypeScript error: app/app.ts(12,10): Error TS2305: Module '"/Users/endriazizi/Documents/Project/
app/node_modules/ionic-native/dist/index"' has no exported member 'SecureStorage

in my package.json:

"cordova-plugin-facebook4",
"cordova-plugin-device@~1.1.2",
"cordova-plugin-console@~1.0.3",
"cordova-plugin-whitelist@~1.2.2",
"cordova-plugin-statusbar@~2.1.3",
"ionic-plugin-keyboard@~2.2.1",
"cordova-plugin-splashscreen@~3.2.2",
"cordova-plugin-secure-storage@~2.4.1",
"cordova-plugin-inappbrowser@~1.4.0",
"cordova-plugin-geolocation@~2.2.0",
"cordova-plugin-facebook4@~1.7.1"

I don't know what to do

Can someone help me?
screen shot 2016-08-27 at 19 00 52

Can a twin app get data?

If my mobile has installed a twin app (other instance of same app for example), can this app gets data from original app? (twin app know namespace and data names)
Thanks.

TypeError: Cannot read property 'SecureStorage' of undefined

Hi,
I have a problem when I use it. The code like this:

 this.secureStorage = new SecureStorage();
    this.secureStorage.create(Config.storage_user_info_name).then(() => {
      console.log("secureStorage create success.");
    }, (error) => {
      console.log("secureStorage create error:" + error);
    });

when invoke the create method have a error like the title, how can I solve it? Thanks!

iCloud syncing not optional

SAMKeychainQuery.synchronizationMode is set by default SAMKeychainQuerySynchronizationModeAny which later sets kSecAttrSynchronizable to kSecAttrSynchronizableAny. I have some code but am not an Objective C expert. I did step through the debugger in XCode and it looks like my code is correctly setting the value of kSecAttrSynchronizable to "@no". I wasn't sure if it was ok to do a PR against this repo so I here are the links to my commits. Please review and let me know if I can do a PR against this repo. Thanks!
spaceagegroop@518cdc8

Fixed icloudsync variable name type:
spaceagegroop@a09d523

Why use JS sjcl library to do the AES instead of use Android Java API

As I saw in some forks, they are using Android API to do the AES encryption/decryption instead of doing such using JavaScript.
Since JavaScript AES implementation usually slower and also blocking (sync) unless put it into web worker.

I guess, maybe the author just need to support Android with a quick solution, but not care about performance that much?

Error on Android 6.0 Marshmallow

When using this plugin, we occasionally get the following error on Android 6.0 devices. I've posted our log below of the error - any ideas on what's causing this?

`02-09 16:17:40.909 455 455 D keystore: Ran out of operation handles, trying to prune 0xb7744370

02-09 16:17:40.911 455 455 D keystore: Ran out of operation handles, trying to prune 0xb7747650

02-09 16:17:40.913 455 455 D keystore: Ran out of operation handles, trying to prune 0xb7746818

02-09 16:17:40.914 455 455 D keystore: Ran out of operation handles, trying to prune 0xb7741b38

02-09 16:17:40.915 455 455 D keystore: Ran out of operation handles, trying to prune 0xb7742850

02-09 16:17:40.916 21823 22871 E SecureStorage: Decrypt failed :

02-09 16:17:40.916 21823 22871 E SecureStorage: javax.crypto.IllegalBlockSizeException

02-09 16:17:40.916 21823 22871 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:486)

02-09 16:17:40.916 21823 22871 E SecureStorage: at javax.crypto.Cipher.d oFinal(Cipher.java:1502)

02-09 16:17:40.916 21823 22871 E SecureStorage: at com.crypho.plugins.RS A.decrypt(RSA.java:28)

02-09 16:17:40.916 21823 22871 E SecureStorage: at com.crypho.plugins.Se cureStorage$3.run(SecureStorage.java:79)

02-09 16:17:40.916 21823 22871 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

02-09 16:17:40.916 21823 22871 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

02-09 16:17:40.916 21823 22871 E SecureStorage: at java.lang.Thread.run( Thread.java:818)

02-09 16:17:40.916 21823 22871 E SecureStorage: Caused by: android.security.KeyS toreException: Invalid operation handle

02-09 16:17:40.916 21823 22871 E SecureStorage: at android.security.KeyS tore.getKeyStoreException(KeyStore.java:632)

02-09 16:17:40.916 21823 22871 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunke dStreamer.java:132)

02-09 16:17:40.916 21823 22871 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunk edStreamer.java:217)

02-09 16:17:40.916 21823 22871 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:473)

02-09 16:17:40.916 21823 22871 E SecureStorage: ... 6 more 02-09 16:17:40.917 21823 22872 E SecureStorage: Decrypt failed :

02-09 16:17:40.917 21823 22872 E SecureStorage: javax.crypto.IllegalBlockSizeExc eption

02-09 16:17:40.917 21823 22872 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:486)

02-09 16:17:40.917 21823 22872 E SecureStorage: at javax.crypto.Cipher.d oFinal(Cipher.java:1502)

02-09 16:17:40.917 21823 22872 E SecureStorage: at com.crypho.plugins.RS A.decrypt(RSA.java:28)

02-09 16:17:40.917 21823 22872 E SecureStorage: at com.crypho.plugins.Se cureStorage$3.run(SecureStorage.java:79)

02-09 16:17:40.917 21823 22872 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

02-09 16:17:40.917 21823 22872 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

02-09 16:17:40.917 21823 22872 E SecureStorage: at java.lang.Thread.run( Thread.java:818) $ toreException: Invalid operation handle

02-09 16:17:40.917 21823 22872 E SecureStorage: at android.security.KeyS tore.getKeyStoreException(KeyStore.java:632)

02-09 16:17:40.917 21823 22872 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunke dStreamer.java:132)

02-09 16:17:40.917 21823 22872 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunk edStreamer.java:217)

02-09 16:17:40.917 21823 22872 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:473)

02-09 16:17:40.917 21823 22872 E SecureStorage: ... 6 more

02-09 16:17:40.918 21823 23084 E SecureStorage: Decrypt failed :

02-09 16:17:40.918 21823 23084 E SecureStorage: javax.crypto.IllegalBlockSizeExc eption

02-09 16:17:40.918 21823 23084 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:486)

02-09 16:17:40.918 21823 23084 E SecureStorage: at javax.crypto.Cipher.d oFinal(Cipher.java:1502)

02-09 16:17:40.918 21823 23084 E SecureStorage: at com.crypho.plugins.RS A.decrypt(RSA.java:28)

02-09 16:17:40.918 21823 23084 E SecureStorage: at com.crypho.plugins.Se cureStorage$3.run(SecureStorage.java:79)

02-09 16:17:40.918 21823 23084 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

02-09 16:17:40.918 21823 23084 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

02-09 16:17:40.918 21823 23084 E SecureStorage: at java.lang.Thread.run( Thread.java:818)

02-09 16:17:40.918 21823 23084 E SecureStorage: Caused by: android.security.KeyS toreException: Invalid operation handle

02-09 16:17:40.918 21823 23084 E SecureStorage: at android.security.KeyS tore.getKeyStoreException(KeyStore.java:632)

02-09 16:17:40.918 21823 23084 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunke dStreamer.java:132)

02-09 16:17:40.918 21823 23084 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunk edStreamer.java:217)

02-09 16:17:40.918 21823 23084 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:473)

02-09 16:17:40.918 21823 23084 E SecureStorage: ... 6 more

02-09 16:17:40.919 21823 22874 E SecureStorage: Decrypt failed :

02-09 16:17:40.919 21823 22874 E SecureStorage: javax.crypto.IllegalBlockSizeExc eption

02-09 16:17:40.919 21823 22874 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:486)

02-09 16:17:40.919 21823 22874 E SecureStorage: at javax.crypto.Cipher.d oFinal(Cipher.java:1502)

02-09 16:17:40.919 21823 22874 E SecureStorage: at com.crypho.plugins.RS A.decrypt(RSA.java:28)

02-09 16:17:40.919 21823 22874 E SecureStorage: at com.crypho.plugins.Se cureStorage$3.run(SecureStorage.java:79)

02-09 16:17:40.919 21823 22874 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

02-09 16:17:40.919 21823 22874 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

02-09 16:17:40.919 21823 22874 E SecureStorage: at java.lang.Thread.run( Thread.java:818)

02-09 16:17:40.919 21823 22874 E SecureStorage: Caused by: android.security.KeyS toreException: Invalid operation handle

02-09 16:17:40.919 21823 22874 E SecureStorage: at android.security.KeyS tore.getKeyStoreException(KeyStore.java:632)

02-09 16:17:40.919 21823 22874 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunke dStreamer.java:132)

02-09 16:17:40.919 21823 22874 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunk edStreamer.java:217)

02-09 16:17:40.919 21823 22874 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:473)

02-09 16:17:40.919 21823 22874 E SecureStorage: ... 6 more

02-09 16:17:40.920 21823 23086 E SecureStorage: Decrypt failed :

02-09 16:17:40.920 21823 23086 E SecureStorage: javax.crypto.IllegalBlockSizeExc eption

02-09 16:17:40.920 21823 23086 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:486)

02-09 16:17:40.920 21823 23086 E SecureStorage: at javax.crypto.Cipher.d oFinal(Cipher.java:1502)

02-09 16:17:40.920 21823 23086 E SecureStorage: at com.crypho.plugins.RS A.decrypt(RSA.java:28)

02-09 16:17:40.920 21823 23086 E SecureStorage: at com.crypho.plugins.Se cureStorage$3.run(SecureStorage.java:79)

02-09 16:17:40.920 21823 23086 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

02-09 16:17:40.920 21823 23086 E SecureStorage: at java.util.concurrent. ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

02-09 16:17:40.920 21823 23086 E SecureStorage: at java.lang.Thread.run( Thread.java:818)

02-09 16:17:40.920 21823 23086 E SecureStorage: Caused by: android.security.KeyS toreException: Invalid operation handle

02-09 16:17:40.920 21823 23086 E SecureStorage: at android.security.KeyS tore.getKeyStoreException(KeyStore.java:632)

02-09 16:17:40.920 21823 23086 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunke dStreamer.java:132)

02-09 16:17:40.920 21823 23086 E SecureStorage: at android.security.keys tore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunk edStreamer.java:217)

02-09 16:17:40.920 21823 23086 E SecureStorage: at android.security.keys tore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.jav a:473)

02-09 16:17:40.920 21823 23086 E SecureStorage: ... 6 more
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.