aesCtr method

  1. @override
BuAesCtr aesCtr(
  1. List<int> key,
  2. List<int> counter
)
override

Creates CTR mode with 16, 24 or 32-byte key and 16-byte counter. Throws on invalid lengths.

Implementation

@override
BuAesCtr aesCtr(List<int> key, List<int> counter) {
  ApiValidate.oneOfLengths(
    key,
    AES.allowedKeysLength,
    operation: "aesCtr",
    name: "key",
  );
  ApiValidate.length(counter, 16, operation: "aesCtr", name: "counter");
  return _inner.aesCtr(key, counter);
}