codelab-biometric-login
codelab-biometric-login copied to clipboard
Missing instruction for R.string.secret_key_name
https://developer.android.com/codelabs/biometric-login?authuser=1#2 The final code snippet contains a reference to R.string.secret_key_name. The student is not told what this value is to be set to.
This causes failures. The name of the key when encrypting is val secretKeyName = "biometric_sample_encryption_key" but in decryption, it is val secretKeyName = getString(R.string.secret_key_name). This causes the example to fail with an encryption error
:
Caused by: javax.crypto.AEADBadTagException
The name must be consistent.