Skip to content

Conversation

ykhandelwaly
Copy link

This change addresses a GeneralSecurityException: Keystore operation failed error that occurs on certain devices, notably the iMin POS running Android 10.

The root cause appears to be a device-specific bug in the Android KeyStore implementation that prevents the generation of a standard 256-bit AES key.

To resolve this, a fallback mechanism has been implemented. If the initial attempt to create a 256-bit master key fails, the code will now automatically retry the operation with a 128-bit key. This provides a workaround for the affected devices without altering the behavior for devices that correctly support 256-bit keys.

This change addresses a `GeneralSecurityException: Keystore operation failed` error that occurs on certain devices, notably the iMin POS running Android 10.

The root cause appears to be a device-specific bug in the Android KeyStore implementation that prevents the generation of a standard 256-bit AES key.

To resolve this, a fallback mechanism has been implemented. If the initial attempt to create a 256-bit master key fails, the code will now automatically retry the operation with a 128-bit key. This provides a workaround for the affected devices without altering the behavior for devices that correctly support 256-bit keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant