2 writes to HashLengthInBytes
System.Security.Cryptography (2)
System\Security\Cryptography\IncrementalHash.cs (2)
35HashLengthInBytes = _hash.HashSizeInBytes; 45HashLengthInBytes = _hmac.HashSizeInBytes;
33 references to HashLengthInBytes
Microsoft.AspNetCore.Components.Endpoints (2)
Builder\ResourceCollectionUrlEndpoint.cs (2)
116Span<byte> result = stackalloc byte[incrementalHash.HashLengthInBytes]; 125Span<char> fingerprintSpan = stackalloc char[(incrementalHash.HashLengthInBytes * 4 / 3) + 3];
System.Net.Security (2)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (2)
684hmacMic.GetHashAndReset(MemoryMarshal.CreateSpan(ref response.Mic[0], hmacMic.HashLengthInBytes)); 726Span<byte> hmacResult = stackalloc byte[hmac.HashLengthInBytes];
System.Security.Cryptography (27)
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaManaged.cs (1)
454int hashLength = hash.HashLengthInBytes;
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (4)
321Debug.Assert(hasher.HashLengthInBytes == hLen); 426Debug.Assert(hasher.HashLengthInBytes == hLen); 526Debug.Assert(hasher.HashLengthInBytes == hLen); 590int hLen = hasher.HashLengthInBytes;
System\Security\Cryptography\IncrementalHash.cs (19)
125byte[] ret = new byte[HashLengthInBytes]; 128Debug.Assert(written == HashLengthInBytes); 147/// than <see cref="HashLengthInBytes"/>. 153if (destination.Length < HashLengthInBytes) 163if (destination.Length < HashLengthInBytes) 175Debug.Assert(destination.Length >= HashLengthInBytes); 197byte[] ret = new byte[HashLengthInBytes]; 200Debug.Assert(written == HashLengthInBytes); 219/// than <see cref="HashLengthInBytes"/>. 225if (destination.Length < HashLengthInBytes) 253if (destination.Length < HashLengthInBytes) 265Debug.Assert(destination.Length >= HashLengthInBytes); 299/// <paramref name="hash"/> has a length not equal to <see cref="HashLengthInBytes" />. 330/// <paramref name="hash"/> has a length not equal to <see cref="HashLengthInBytes" />. 476if (hash.Length != ih.HashLengthInBytes) 477throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, ih.HashLengthInBytes), nameof(hash)); 484if (ih.HashLengthInBytes > MaxStackAlloc) 486computedBuffer = new byte[ih.HashLengthInBytes]; 494Debug.Assert(written == ih.HashLengthInBytes);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (2)
93_blockSize = _hmac.HashLengthInBytes; 121_blockSize = _hmac.HashLengthInBytes;
System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs (1)
60if (destination.Length >= hash.HashLengthInBytes)
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\HashToBeSignedBuilder.cs (2)
31Debug.Assert(_incrementalHash.HashLengthInBytes <= 512 / 8); // largest hash we can get (SHA512). 32Span<byte> hash = stackalloc byte[_incrementalHash.HashLengthInBytes];