vncore / com.venuenext.vncore.security / Keystore / encryptText

encryptText

fun encryptText(context: Context, alias: String, textToEncrypt: String): ByteArray

Ecrypts text string with alias name.

Parameters

alias - the alias name of the keystore.

textToEncrypt - the string to encrypt.

Exceptions

UnrecoverableEntryException - , NoSuchAlgorithmException, KeyStoreException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, IOException, InvalidAlgorithmParameterException, SignatureException, BadPaddingException, IllegalBlockSizeException

Return
the encrypted byte array.