pradeep1991singh / cordova-plugin-secure-key-store

Cordova plugin for securely saving keys, passwords or strings on devices.
MIT License
25 stars 29 forks source link

input must be under 256 bytes #14

Closed simonhaenisch closed 6 years ago

simonhaenisch commented 6 years ago

I'm trying to store a JWT on Android and get the following error message:

{ "code": 9, "api-level": 22, "message": "input must be under 256 bytes" }

Is there any way to get around this limit?

pradeep1991singh commented 6 years ago

You can break token in multiple chunks for 256 and whenever needed can get and combine them in one.

simonhaenisch commented 6 years ago

I just read that the 256 bytes limit is because of RSA encryption... with AES there is no limit. However AES is only supported by API level 23 (see here) and I'm on 22. Just leaving this note here in case someone else runs into it in the future.

Will have to find another way to store the token (breaking into chunks is too complex for this task imo).