Aes constructor

Aes(
  1. Uint8List key
)

Expands key (16, 24, or 32 bytes) into round keys for both directions.

Implementation

Aes(Uint8List key)
  : _rounds = switch (key.length) {
      16 => 10,
      24 => 12,
      32 => 14,
      _ =>
        throw ArgumentError.value(
          key.length,
          'key',
          'AES key must be 16, 24, or 32 bytes',
        ),
    } {
  _encKeys = _expandKey(key);
  _decKeys = _invertKey(_encKeys);
}