UtilHashingComputeHashOfBytesT Method
Computes a hash for the specified byte array 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 ComputeHashOfBytes<T>(
byte[] data
)
where T : HashAlgorithm
Public Shared Function ComputeHashOfBytes(Of T As HashAlgorithm) (
data As Byte()
) As String
Dim data As Byte()
Dim returnValue As String
returnValue = UtilHashing.ComputeHashOfBytes(data)
public:
generic<typename T>
where T : HashAlgorithm
static String^ ComputeHashOfBytes(
array<unsigned char>^ data
)
static member ComputeHashOfBytes :
data : byte[] -> string when 'T : HashAlgorithm
No code example is currently available or this language may not be supported.
- data Byte
-
The byte array.
- 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 data as Byte() = {1, 2, 3, 4, 5}
Dim md5 As String = ComputeHashOfBytes(Of MD5CryptoServiceProvider)(data)
Dim sha1 As String = ComputeHashOfBytes(Of SHA1CryptoServiceProvider)(data)
Dim sha256 As String = ComputeHashOfBytes(Of SHA256CryptoServiceProvider)(data)
Dim sha384 As String = ComputeHashOfBytes(Of SHA384CryptoServiceProvider)(data)
Dim sha512 As String = ComputeHashOfBytes(Of SHA512CryptoServiceProvider)(data)
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.