The OpenD Programming Language

crc64ISOOf

This is a convenience alias for std.digest.digest using the CRC64-ISO implementation.

ubyte[8]
crc64ISOOf
(
T...
)
()

Parameters

data T

InputRange of ElementType implicitly convertible to ubyte, ubyte[] or ubyte[num] or one or more arrays of any type.

Return Value

Type: ubyte[8]

CRC64-ISO of data

Examples

ubyte[] data = [4,5,7,25];
assert(data.crc64ISOOf == [0, 0, 0, 80, 137, 232, 203, 120]);

import std.utf : byChar;
assert("hello"d.byChar.crc64ISOOf == [0, 0, 16, 216, 226, 238, 62, 60]);

ubyte[8] hash = "abc".crc64ISOOf();
assert("abc".crc64ISOOf == [0, 0, 0, 0, 32, 196, 118, 55]);
assert(hash == digest!CRC64ISO("ab", "c"));

import std.range : iota;
enum ubyte S = 5, F = 66;

assert(iota(S, F).crc64ISOOf == [21, 185, 116, 95, 219, 11, 54, 7]);

Meta