SecureStore can't store string longer then 256 characters



I’m using SecureStore to store the configuration of my application but unfortunately I’m facing a problem with storing strings longer then 256 characters (shorter then 256 works well). I’m always getting the following message:
Error: Set value encountered an error.
Is there any limitation of strings length in the Expo SecureStore? Maybe there are any configuration parameters which could be adjusted? As far as I know there is no limitation on Android(Shared Preferences) and iOS as well.




I am facing this same issue… Android and iOS native storage do not have any limitation (maybe just max value of String in general). What is this problem with SecureStore??



Hi, @ide has been making some improvements to this API recently and might be able to provide some clarity here.



In SDK 20 we used RSA with a 2048-bit key on Android to encrypt the value. Since RSA (by default) encrypts just one block, that’s why there was a size limit. In SDK 21 we made a number of improvements to SecureStore including a switch to use AES to encrypt an arbitrarily long byte stream. We’ll be releasing SDK 21 soon; when we announce it, please try it out and tell us if we can do anything to improve SecureStore.