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

◆ AdjustHashSizeIfNecessary()

ReadOnlySpan< byte > System.Security.Cryptography.DSACng.AdjustHashSizeIfNecessary ( ReadOnlySpan< byte > hash,
Span< byte > stackBuf )
inlineprivate

Definition at line 433 of file DSACng.cs.

434 {
435 int num = ComputeQLength();
436 if (num == hash.Length)
437 {
438 return hash;
439 }
440 if (num < hash.Length)
441 {
442 return hash.Slice(0, num);
443 }
444 int num2 = num - hash.Length;
445 stackBuf.Slice(0, num2).Clear();
446 hash.CopyTo(stackBuf.Slice(num2));
447 return stackBuf.Slice(0, num);
448 }
void CopyTo(Span< T > destination)
ReadOnlySpan< T > Slice(int start)
Span< T > Slice(int start)
Definition Span.cs:271

References System.Security.Cryptography.DSACng.ComputeQLength(), System.ReadOnlySpan< T >.CopyTo(), System.ReadOnlySpan< T >.Length, System.ReadOnlySpan< T >.Slice(), and System.Span< T >.Slice().

Referenced by System.Security.Cryptography.DSACng.CreateSignature(), System.Security.Cryptography.DSACng.TryCreateSignature(), and System.Security.Cryptography.DSACng.VerifySignature().