aesSetMode method

void aesSetMode(
  1. AesMode mode
)

Implementation

void aesSetMode(AesMode mode) {
  if (_aesMode == AesMode.ecb && _aesMode != mode) {
    throw AesCryptArgumentError(
        'Failed to change AES mode. The initialization vector is not set. When changing the mode from ECB to another one, set IV at first.');
  }
  _aesMode = mode;
}