UtilHashingComputeHashOfFileT(FileInfo) Method
Computes a hash for the specified file using the given hash algorithm.
Namespace: DevCase.Core.Security.Cryptography.HashingAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string ComputeHashOfFile<T>(
FileInfo file
)
where T : HashAlgorithm
Public Shared Function ComputeHashOfFile(Of T As HashAlgorithm) (
file As FileInfo
) As String
Dim file As FileInfo
Dim returnValue As String
returnValue = UtilHashing.ComputeHashOfFile(file)
public:
generic<typename T>
where T : HashAlgorithm
static String^ ComputeHashOfFile(
FileInfo^ file
)
static member ComputeHashOfFile :
file : FileInfo -> string when 'T : HashAlgorithm
No code example is currently available or this language may not be supported.
- file FileInfo
-
The file.
- T
-
The HashAlgorithm provider.
String
An Hexadecimal representation of the resulting hash value.
This is a code example.
No code example is currently available or this language may not be supported.
Dim md5 As String = ComputeHashOfFile(Of MD5CryptoServiceProvider)(New FileInfo("C:\File.ext"))
Dim sha1 As String = ComputeHashOfFile(Of SHA1CryptoServiceProvider)(New FileInfo("C:\File.ext"))
Dim sha256 As String = ComputeHashOfFile(Of SHA256CryptoServiceProvider)(New FileInfo("C:\File.ext"))
Dim sha384 As String = ComputeHashOfFile(Of SHA384CryptoServiceProvider)(New FileInfo("C:\File.ext"))
Dim sha512 As String = ComputeHashOfFile(Of SHA512CryptoServiceProvider)(New FileInfo("C:\File.ext"))
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.