codelab-biometric-login icon indicating copy to clipboard operation
codelab-biometric-login copied to clipboard

Missing instruction for R.string.secret_key_name

Open michael-reed-hampton opened this issue 4 years ago • 1 comments

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.

michael-reed-hampton avatar Apr 19 '21 17:04 michael-reed-hampton

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.

michael-reed-hampton avatar Apr 19 '21 20:04 michael-reed-hampton