Exemple #1
0
        public static unsafe uint DigestOf(
            Crc32Table table, byte[] bytes, int offset, int length, uint seed = 0)
        {
            Validate(bytes, offset, length);

            fixed(byte *bytesP = bytes)
            return(DigestOf(table.Data, bytesP + offset, length, seed));
        }
Exemple #2
0
 public static unsafe uint DigestOf(
     Crc32Table table, byte *bytes, int length, uint seed = 0) =>
 DigestOf(table.Data, bytes, length, seed);
Exemple #3
0
 public static unsafe uint DigestOf(
     Crc32Table table, ReadOnlySpan <byte> bytes, uint seed = 0)
 {
     fixed(byte *bytesP = &MemoryMarshal.GetReference(bytes))
     return(DigestOf(table.Data, bytesP, bytes.Length, seed));
 }
Exemple #4
0
 public Crc32(Crc32Table table)
 {
     _table = table ?? Crc32Table.Default;
 }