init method

  1. @override
void init(
  1. bool forEncryption,
  2. CipherParameters params
)
override

Initialise the cipher for processing.

Implementation

@override
void init(bool forEncryption, CipherParameters params) {
  if (params is! ParametersWithIV) {
    throw ArgumentError('CBC requer ParametersWithIV.');
  }
  _forEncryption = forEncryption;
  _iv = Uint8List.fromList(params.iv);
  _cbcV = Uint8List.fromList(_iv);
  _cipher.init(forEncryption, params.parameters);
}