Skip to content Skip to sidebar Skip to footer

Key User Not Authenticated When Using A Secretkey Directly As Loaded From Keystore

I'm trying to encrypt data use Cipher with SecretKey loaded in KeyStore but always got this error : Caused by: android.security.KeyStoreException: Key user not authenticated I tr

Solution 1:

My issue throw because :

I encrypt using the cipher before the key has been flagged for successful user authentication. So move encrypt in onAuthenticationSucceeded and it's worked.

Hope my answer will help someone else.

Post a Comment for "Key User Not Authenticated When Using A Secretkey Directly As Loaded From Keystore"