How to get crc / checksum file in asp.net

Given a file in the local file system:

FileInfo file = new FileInfo(localFilename);

How can I get the CRC value (or some checksum) for this file?

+3
source share
1 answer

Hash algorithms are usually better than CRC because they have fewer collisions; modern hash algorithms are implemented as descendants of the HashAlgorithmclass . MD5 and SHA1 are common options.

AFAIK, .NET does not include CRC classes, but I wrote CRC32 and CRC16 that support all CRC-32 and CRC-16 algorithms.

( CRC), , , . , .

+5

Source: https://habr.com/ru/post/1762651/


All Articles