fun encryptText(context: Context, alias: String, textToEncrypt: String): ByteArray
Ecrypts text string with alias name.
alias
- the alias name of the keystore.
textToEncrypt
- the string to encrypt.
UnrecoverableEntryException
- , NoSuchAlgorithmException, KeyStoreException, NoSuchProviderException,
NoSuchPaddingException, InvalidKeyException, IOException, InvalidAlgorithmParameterException,
SignatureException, BadPaddingException, IllegalBlockSizeException
Return
the encrypted byte array.