decryptCipherTextWithRandomIV method

String decryptCipherTextWithRandomIV(
  1. String cipherText,
  2. String password
)

Decrypt the string using the password. The password can by any length e.g. CryptLib.instance.decryptCipherTextWithRandomIV(encryptText, "Password")

Implementation

String decryptCipherTextWithRandomIV(String cipherText, String password) {
  final decrypted = _encryptDecrypt(cipherText, _sha256key(password, 32),
      _EncryptMode.decrypt, _generateRandomIV16());
  return decrypted.substring(16, decrypted.length);
}