CryptographicOperations.HashData Methode

Definition

Überlädt

Name Beschreibung
HashData(HashAlgorithmName, Byte[])

Berechnet den Hash von Daten.

HashData(HashAlgorithmName, Stream)

Berechnet den Hash eines Datenstroms.

HashData(HashAlgorithmName, ReadOnlySpan<Byte>)

Berechnet den Hash von Daten.

HashData(HashAlgorithmName, Stream, Span<Byte>)

Berechnet den Hash eines Datenstroms.

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

Berechnet den Hash von Daten.

HashData(HashAlgorithmName, Byte[])

Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs

Berechnet den Hash von Daten.

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()

Parameter

hashAlgorithm
HashAlgorithmName

Der Algorithmus, der zum Berechnen des Hashs verwendet wird.

source
Byte[]

Die zu hashenden Daten.

Gibt zurück

Byte[]

Der Hash der Daten.

Ausnahmen

source ist null.

-oder-

hashAlgorithm hat ein Name , das ist null.

hashAlgorithm hat ein Name Leeres.

hashAlgorithm Gibt einen Hashalgorithmus an, der von der aktuellen Plattform nicht unterstützt wird.

hashAlgorithm Gibt einen unbekannten Hashalgorithmus an.

Gilt für:

HashData(HashAlgorithmName, Stream)

Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs

Berechnet den Hash eines Datenstroms.

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()

Parameter

hashAlgorithm
HashAlgorithmName

Der Algorithmus, der zum Berechnen des Hashs verwendet wird.

source
Stream

Der zu hashende Datenstrom.

Gibt zurück

Byte[]

Der Hash der Daten.

Ausnahmen

source ist null.

-oder-

hashAlgorithm hat ein Name , das ist null.

hashAlgorithm hat ein Name Leeres.

-oder-

source das Lesen wird nicht unterstützt.

hashAlgorithm Gibt einen Hashalgorithmus an, der von der aktuellen Plattform nicht unterstützt wird.

hashAlgorithm Gibt einen unbekannten Hashalgorithmus an.

Gilt für:

HashData(HashAlgorithmName, ReadOnlySpan<Byte>)

Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs

Berechnet den Hash von Daten.

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()

Parameter

hashAlgorithm
HashAlgorithmName

Der Algorithmus, der zum Berechnen des Hashs verwendet wird.

source
ReadOnlySpan<Byte>

Die zu hashenden Daten.

Gibt zurück

Byte[]

Der Hash der Daten.

Ausnahmen

hashAlgorithm hat ein Name , das ist null.

hashAlgorithm hat ein Name Leeres.

hashAlgorithm Gibt einen Hashalgorithmus an, der von der aktuellen Plattform nicht unterstützt wird.

hashAlgorithm Gibt einen unbekannten Hashalgorithmus an.

Gilt für:

HashData(HashAlgorithmName, Stream, Span<Byte>)

Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs

Berechnet den Hash eines Datenstroms.

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

Parameter

hashAlgorithm
HashAlgorithmName

Der Algorithmus, der zum Berechnen des Hashs verwendet wird.

source
Stream

Der zu hashende Datenstrom.

destination
Span<Byte>

Der Puffer, der den Hashwert empfängt.

Gibt zurück

Die Gesamtzahl der Bytes, die in destination.

Ausnahmen

source ist null.

-oder-

hashAlgorithm hat ein Name , das ist null.

Der Puffer ist destination zu klein, um die berechnete Hashgröße zu speichern.

-oder-

hashAlgorithm hat ein Name Leeres.

-oder-

source das Lesen wird nicht unterstützt.

hashAlgorithm Gibt einen Hashalgorithmus an, der von der aktuellen Plattform nicht unterstützt wird.

hashAlgorithm Gibt einen unbekannten Hashalgorithmus an.

Gilt für:

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

Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs
Quelle:
CryptographicOperations.cs

Berechnet den Hash von Daten.

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

Parameter

hashAlgorithm
HashAlgorithmName

Der Algorithmus, der zum Berechnen des Hashs verwendet wird.

source
ReadOnlySpan<Byte>

Die zu hashenden Daten.

destination
Span<Byte>

Der Puffer, der den Hashwert empfängt.

Gibt zurück

Die Gesamtzahl der Bytes, die in destination.

Ausnahmen

Der Puffer ist destination zu klein, um die berechnete Hashgröße zu speichern.

-oder-

hashAlgorithm hat ein Name Leeres.

hashAlgorithm hat ein Name , das ist null.

hashAlgorithm Gibt einen Hashalgorithmus an, der von der aktuellen Plattform nicht unterstützt wird.

hashAlgorithm Gibt einen unbekannten Hashalgorithmus an.

Gilt für: