-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hi Ben,
CrcAlgorithm already is quite close to NonCryptographicHashAlgorithm, the base for e.g. Crc32 (https://learn.microsoft.com/en-us/dotnet/api/system.io.hashing.crc32), but there are subtle differencies:
Widthrather thanHashLengthInBytes- No support for
Append(Stream) Clear()rather thanReset()- No
GetHashAndReset() - ...
Aligning the API would enable deriving from NonCryptographicHashAlgorithm for .NET 6+.
Also note the remark "this stable output is the byte sequence { 0x1C, 0xDF, 0x44, 0x21 }, the Little Endian representation of 0x2144DF1C" which relates to your "TODO" (https://github.com/invertedtomato/crc/blob/master/Library/CrcAlgorithm.cs#L11). I think this "TODO" can be completed by equally documenting the output. A user can still reverse/rearrange the resulting CRC as needed.
Best regards,
Matthias
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels