MD5.HashData Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
HashData(Byte[]) |
Computes the hash of data using the MD5 algorithm. |
HashData(Stream) |
Computes the hash of a stream using the MD5 algorithm. |
HashData(ReadOnlySpan<Byte>) |
Computes the hash of data using the MD5 algorithm. |
HashData(Stream, Span<Byte>) |
Computes the hash of a stream using the MD5 algorithm. |
HashData(ReadOnlySpan<Byte>, Span<Byte>) |
Computes the hash of data using the MD5 algorithm. |
HashData(Byte[])
- Source:
- MD5.cs
- Source:
- MD5.cs
- Source:
- MD5.cs
Computes the hash of data using the MD5 algorithm.
public:
static cli::array <System::Byte> ^ HashData(cli::array <System::Byte> ^ source);
public static byte[] HashData (byte[] source);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static byte[] HashData (byte[] source);
static member HashData : byte[] -> byte[]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member HashData : byte[] -> byte[]
Public Shared Function HashData (source As Byte()) As Byte()
Parameters
- source
- Byte[]
The data to hash.
Returns
The hash of the data.
- Attributes
Exceptions
source
is null
.
Applies to
HashData(Stream)
- Source:
- MD5.cs
- Source:
- MD5.cs
- Source:
- MD5.cs
Computes the hash of a stream using the MD5 algorithm.
public:
static cli::array <System::Byte> ^ HashData(System::IO::Stream ^ source);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static byte[] HashData (System.IO.Stream source);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member HashData : System.IO.Stream -> byte[]
Public Shared Function HashData (source As Stream) As Byte()
Parameters
- source
- Stream
The stream to hash.
Returns
The hash of the data.
- Attributes
Exceptions
source
is null
.
source
does not support reading.
Applies to
HashData(ReadOnlySpan<Byte>)
- Source:
- MD5.cs
- Source:
- MD5.cs
- Source:
- MD5.cs
Computes the hash of data using the MD5 algorithm.
public:
static cli::array <System::Byte> ^ HashData(ReadOnlySpan<System::Byte> source);
public static byte[] HashData (ReadOnlySpan<byte> source);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static byte[] HashData (ReadOnlySpan<byte> source);
static member HashData : ReadOnlySpan<byte> -> byte[]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member HashData : ReadOnlySpan<byte> -> byte[]
Public Shared Function HashData (source As ReadOnlySpan(Of Byte)) As Byte()
Parameters
- source
- ReadOnlySpan<Byte>
The data to hash.
Returns
The hash of the data.
- Attributes
Applies to
HashData(Stream, Span<Byte>)
- Source:
- MD5.cs
- Source:
- MD5.cs
- Source:
- MD5.cs
Computes the hash of a stream using the MD5 algorithm.
public:
static int HashData(System::IO::Stream ^ source, Span<System::Byte> destination);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static int HashData (System.IO.Stream source, Span<byte> destination);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member HashData : System.IO.Stream * Span<byte> -> int
Public Shared Function HashData (source As Stream, destination As Span(Of Byte)) As Integer
Parameters
- source
- Stream
The stream to hash.
Returns
The total number of bytes written to destination
.
- Attributes
Exceptions
source
is null
.
The buffer in destination
is too small to hold the calculated hash
size. The MD5 algorithm always produces a 128-bit hash, or 16 bytes.
-or-
source
does not support reading.
Applies to
HashData(ReadOnlySpan<Byte>, Span<Byte>)
- Source:
- MD5.cs
- Source:
- MD5.cs
- Source:
- MD5.cs
Computes the hash of data using the MD5 algorithm.
public:
static int HashData(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination);
public static int HashData (ReadOnlySpan<byte> source, Span<byte> destination);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static int HashData (ReadOnlySpan<byte> source, Span<byte> destination);
static member HashData : ReadOnlySpan<byte> * Span<byte> -> int
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member HashData : ReadOnlySpan<byte> * Span<byte> -> int
Public Shared Function HashData (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer
Parameters
- source
- ReadOnlySpan<Byte>
The data to hash.
Returns
The total number of bytes written to destination
.
- Attributes
Exceptions
The buffer in destination
is too small to hold the calculated hash size. The MD5 algorithm always produces a 128-bit hash, or 16 bytes.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기