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

◆ TryHashData() [2/2]

static bool Internal.Cryptography.CngCommon.TryHashData ( ReadOnlySpan< byte > source,
Span< byte > destination,
HashAlgorithmName hashAlgorithm,
out int bytesWritten )
inlinestatic

Definition at line 17 of file CngCommon.cs.

18 {
19 using Internal.Cryptography.HashProviderCng hashProviderCng = new Internal.Cryptography.HashProviderCng(hashAlgorithm.Name, null);
20 if (destination.Length < hashProviderCng.HashSizeInBytes)
21 {
22 bytesWritten = 0;
23 return false;
24 }
25 hashProviderCng.AppendHashData(source);
26 return hashProviderCng.TryFinalizeHashAndReset(destination, out bytesWritten);
27 }
override void AppendHashData(ReadOnlySpan< byte > source)

References Internal.Cryptography.HashProviderCng.AppendHashData(), System.destination, System.Security.Cryptography.HashAlgorithmName.Name, and System.source.