copyCheckBytes function
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));