copyCheckBytes function

Uint8List copyCheckBytes(
  1. Uint8List bytes,
  2. int length, {
  3. String name = "Bytes",
})

Throws an ArgumentError if the bytes are not of the required length and returns a copy of the bytes.

Implementation

Uint8List copyCheckBytes(
  Uint8List bytes, int length, { String name = "Bytes", }
) => Uint8List.fromList(checkBytes(bytes, length, name: name));