public static CalculateChecksum ( string hashAlgorithm, IFileInfo file ) : byte[] | ||
hashAlgorithm | string | Hash algorithm. |
file | IFileInfo | File to be hashed. |
return | byte[] |
public static byte[] CalculateChecksum(string hashAlgorithm, IFileInfo file) {
using (var stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)) {
return CalculateChecksum(hashAlgorithm, stream);
}
}
Crypto::CalculateChecksum ( string hashAlgorithm, Stream inputStream ) : byte[] |