CryptographicOperations.HashData Metod

Definition

Överlagringar

Name Description
HashData(HashAlgorithmName, Byte[])

Beräknar hashen av data.

HashData(HashAlgorithmName, Stream)

Beräknar hashen för en dataström.

HashData(HashAlgorithmName, ReadOnlySpan<Byte>)

Beräknar hashen av data.

HashData(HashAlgorithmName, Stream, Span<Byte>)

Beräknar hashen för en dataström.

HashData(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>)

Beräknar hashen av data.

HashData(HashAlgorithmName, Byte[])

Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs

Beräknar hashen av data.

public:
 static cli::array <System::Byte> ^ HashData(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ source);
public static byte[] HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] source);
static member HashData : System.Security.Cryptography.HashAlgorithmName * byte[] -> byte[]
Public Shared Function HashData (hashAlgorithm As HashAlgorithmName, source As Byte()) As Byte()

Parametrar

hashAlgorithm
HashAlgorithmName

Algoritmen som används för att beräkna hashen.

source
Byte[]

Data som ska hash.

Returer

Byte[]

Datashashen.

Undantag

source är null.

-eller-

hashAlgorithm har en Name som är null.

hashAlgorithm har en Name som är tom.

hashAlgorithm anger en hash-algoritm som inte stöds av den aktuella plattformen.

hashAlgorithm anger en okänd hash-algoritm.

Gäller för

HashData(HashAlgorithmName, Stream)

Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs

Beräknar hashen för en dataström.

public:
 static cli::array <System::Byte> ^ HashData(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::IO::Stream ^ source);
public static byte[] HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.IO.Stream source);
static member HashData : System.Security.Cryptography.HashAlgorithmName * System.IO.Stream -> byte[]
Public Shared Function HashData (hashAlgorithm As HashAlgorithmName, source As Stream) As Byte()

Parametrar

hashAlgorithm
HashAlgorithmName

Algoritmen som används för att beräkna hashen.

source
Stream

Strömmen till hash.

Returer

Byte[]

Datashashen.

Undantag

source är null.

-eller-

hashAlgorithm har en Name som är null.

hashAlgorithm har en Name som är tom.

-eller-

source stöder inte läsning.

hashAlgorithm anger en hash-algoritm som inte stöds av den aktuella plattformen.

hashAlgorithm anger en okänd hash-algoritm.

Gäller för

HashData(HashAlgorithmName, ReadOnlySpan<Byte>)

Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs

Beräknar hashen av data.

public:
 static cli::array <System::Byte> ^ HashData(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> source);
public static byte[] HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source);
static member HashData : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> byte[]
Public Shared Function HashData (hashAlgorithm As HashAlgorithmName, source As ReadOnlySpan(Of Byte)) As Byte()

Parametrar

hashAlgorithm
HashAlgorithmName

Algoritmen som används för att beräkna hashen.

source
ReadOnlySpan<Byte>

Data som ska hash.

Returer

Byte[]

Datashashen.

Undantag

hashAlgorithm har en Name som är null.

hashAlgorithm har en Name som är tom.

hashAlgorithm anger en hash-algoritm som inte stöds av den aktuella plattformen.

hashAlgorithm anger en okänd hash-algoritm.

Gäller för

HashData(HashAlgorithmName, Stream, Span<Byte>)

Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs

Beräknar hashen för en dataström.

public:
 static int HashData(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::IO::Stream ^ source, Span<System::Byte> destination);
public static int HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.IO.Stream source, Span<byte> destination);
static member HashData : System.Security.Cryptography.HashAlgorithmName * System.IO.Stream * Span<byte> -> int
Public Shared Function HashData (hashAlgorithm As HashAlgorithmName, source As Stream, destination As Span(Of Byte)) As Integer

Parametrar

hashAlgorithm
HashAlgorithmName

Algoritmen som används för att beräkna hashen.

source
Stream

Strömmen till hash.

destination
Span<Byte>

Bufferten för att ta emot hash-värdet.

Returer

Det totala antalet byte som skrivits till destination.

Undantag

source är null.

-eller-

hashAlgorithm har en Name som är null.

Bufferten i destination är för liten för att rymma den beräknade hashstorleken.

-eller-

hashAlgorithm har en Name som är tom.

-eller-

source stöder inte läsning.

hashAlgorithm anger en hash-algoritm som inte stöds av den aktuella plattformen.

hashAlgorithm anger en okänd hash-algoritm.

Gäller för

HashData(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>)

Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs
Källa:
CryptographicOperations.cs

Beräknar hashen av data.

public:
 static int HashData(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> source, Span<System::Byte> destination);
public static int HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> source, Span<byte> destination);
static member HashData : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * Span<byte> -> int
Public Shared Function HashData (hashAlgorithm As HashAlgorithmName, source As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer

Parametrar

hashAlgorithm
HashAlgorithmName

Algoritmen som används för att beräkna hashen.

source
ReadOnlySpan<Byte>

Data som ska hash.

destination
Span<Byte>

Bufferten för att ta emot hash-värdet.

Returer

Det totala antalet byte som skrivits till destination.

Undantag

Bufferten i destination är för liten för att rymma den beräknade hashstorleken.

-eller-

hashAlgorithm har en Name som är tom.

hashAlgorithm har en Name som är null.

hashAlgorithm anger en hash-algoritm som inte stöds av den aktuella plattformen.

hashAlgorithm anger en okänd hash-algoritm.

Gäller för