Mike Littman February 2016
Android Fingerprint Authentication: Crypto primitive not initialized
I implemented Fingerprint authentication inside the application which was working fine a week ago. No changes to the code and I am now getting the following error:
FATAL EXCEPTION: main
Caused by: java.lang.IllegalStateException: Crypto primitive not initialized
I'm not sure what's going on as nothing has been changed in the code, even verifying with a clean pull of the branch.
Below is a list of dependencies that I am using in the app.
transitive = true;
Is there anything I should be aware of in regards to these new-ish APIs?
Caleb March 2016
You need to initialize your cipher object for Encryption or Decryption
cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_CBC + "/" + KeyProperties.ENCRYPTION_PADDING_PKCS7);
Depending on what you are trying to do, you may need to generate a SecretKey, KeyStore and KeyGenerator as well. I can elaborate further if needed.
Asked in February 2016
Viewed 2,816 times
Answered 1 times
Leave an answer
Quote of the day: live life