setCipher

open fun setCipher(ivSpec: String, secretKey: String, algorithm: BaseCipher.Algorithm)

Method to set the cipher instance

Parameters

ivSpec

: initialization vector as String

secretKey

: secret key as String

algorithm

: algorithm used by the cipher

Throws

when an error occurred


open fun setCipher(ivSpec: IvParameterSpec, secretKey: SecretKey, algorithm: BaseCipher.Algorithm)

Method to set the cipher instance

Parameters

ivSpec

: initialization vector as IvParameterSpec

secretKey

: secret key as SecretKey

algorithm

: algorithm used by the cipher

Throws

when an error occurred