pradeep1991singh / react-native-secure-key-store

React Native Library for securely storing keys to iOS KeyChain and Android KeyStore.
ISC License
238 stars 69 forks source link

iOS cant store lengthy strings #77

Open Overtorment opened 4 years ago

Overtorment commented 4 years ago

Following throws an error on iOS both sim and real device:

        const ss = '1'.repeat(18888888);
        RNSecureKeyStore.set('test', ss);

threshold string length is around 16,777,110 according to https://stackoverflow.com/questions/13488793/is-there-any-length-limit-of-string-stored-in-keychain which is not much, I'd say, 16 megs.

it would be nice if this library could split data in chunks instead of outsourcing it to javascript code.

tested on iphone11, ios14 (beta) on sim: iPhone 11 (13.4)

Overtorment commented 4 years ago

did some tests on android emu, and it started throwing errors with string length around 44777101

davidgovea commented 4 years ago

👍 It would be good to note this limitation in the README.

However, I'm not sure that data-splitting functionality belongs in this library.. seems pretty use-case specific.