getCrc64 function

int getCrc64(
  1. List<int> array, [
  2. int crc = 0
])

Get the CRC 32|64 checksum of the given array.

Example:

final text = 'hello world';
final crc64s = getCrc64(text.codeUnits);
print(crc64s);  // 5981764153023615706
final crc32s = getCrc32(text.codeUnits);
print(crc32s);  // 222957957

final file = File('README.md');
final crc64f = getCrc64(file.readAsBytesSync());
print(crc64f);
final crc32f = getCrc32(file.readAsBytesSync());
print(crc32f)

Get the CRC-64 checksum of the given array. You can append bytes to an already computed crc by specifying the previous crc value.

Implementation

/// Get the CRC-64 checksum of the given array. You can append bytes to an
/// already computed crc by specifying the previous [crc] value.
int getCrc64(List<int> array, [int crc = 0]) => getCrc64_(array, crc);