Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ HashData() [4/4]

static byte[] Internal.Cryptography.CngCommon.HashData ( Stream data,
HashAlgorithmName hashAlgorithm )
inlinestatic

Definition at line 29 of file CngCommon.cs.

30 {
31 using Internal.Cryptography.HashProviderCng hashProviderCng = new Internal.Cryptography.HashProviderCng(hashAlgorithm.Name, null);
32 byte[] array = new byte[4096];
33 int count;
34 while ((count = data.Read(array, 0, array.Length)) > 0)
35 {
36 hashProviderCng.AppendHashData(array, 0, count);
37 }
38 return hashProviderCng.FinalizeHashAndReset();
39 }
override void AppendHashData(ReadOnlySpan< byte > source)
int Read(byte[] buffer, int offset, int count)

References Internal.Cryptography.HashProviderCng.AppendHashData(), System.array, System.count, System.Security.Cryptography.HashAlgorithmName.Name, and System.IO.Stream.Read().