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

◆ AdjustHashSizeIfNecessary()

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

Definition at line 451 of file DSAImplementation.cs.

452 {
453 int num = ComputeQLength();
454 if (num == hash.Length)
455 {
456 return hash;
457 }
458 if (num < hash.Length)
459 {
460 return hash.Slice(0, num);
461 }
462 int num2 = num - hash.Length;
463 stackBuf.Slice(0, num2).Clear();
464 hash.CopyTo(stackBuf.Slice(num2));
465 return stackBuf.Slice(0, num);
466 }
void CopyTo(Span< T > destination)
ReadOnlySpan< T > Slice(int start)
Span< T > Slice(int start)
Definition Span.cs:271

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

Referenced by System.Security.Cryptography.DSAImplementation.DSACng.CreateSignature(), System.Security.Cryptography.DSAImplementation.DSACng.TryCreateSignatureCore(), and System.Security.Cryptography.DSAImplementation.DSACng.VerifySignatureCore().