init method

  1. @override
void init(
  1. CipherParameters params
)
override

Init the MAC with its initialization params. The type of CipherParameters depends on the algorithm being used (see the documentation of each implementation to find out more).

Implementation

@override
void init(CipherParameters params) {
  if (params is ParametersWithIV) {
    _params = params;
  } else if (params is KeyParameter) {
    final zeroIV = Uint8List(params.key.length);
    _params = ParametersWithIV(params, zeroIV);
  }

  reset();

  _cipher.init(true, _params);
}