Last active
September 13, 2020 03:23
-
-
Save husaynhakeem/1ee42ca84aa41b40d4e0f45017d8d6e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { | |
| val cipher = result.cryptoObject?.cipher ?: return | |
| val plainData = "Hello world!" // Whatever data you want to encrypt | |
| val cipherData = cipher.doFinal(plainData.toByteArray(Charsets.UTF_8)) // Encrypted data | |
| // Do something with the encrypted data | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment