4 instantiations of IncrementalHash
System.Security.Cryptography (4)
System\Security\Cryptography\IncrementalHash.cs (4)
285new IncrementalHash(_algorithmName, _hash.Clone()) : 286new IncrementalHash(_algorithmName, _hmac!.Clone()); 390return new IncrementalHash(hashAlgorithm, HashProviderDispenser.CreateHashProvider(hashAlgorithm.Name)); 449return new IncrementalHash(hashAlgorithm, new HMACCommon(hashAlgorithm.Name, key, -1));
155 references to IncrementalHash
dotnet-sourcelink (3)
ILAssembler (2)
GrammarVisitor.cs (2)
253using var hash = IncrementalHash.CreateHash(System.Security.Cryptography.HashAlgorithmName.SHA256);
ILCompiler.ReadyToRun (6)
Compiler\CryptographicHashProvider.cs (6)
215using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 227using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 240using (var incrementalHash = IncrementalHash.CreateHash(algorithmName))
Microsoft.AspNetCore.Components.Endpoints (15)
Builder\ResourceCollectionUrlEndpoint.cs (3)
115var incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256); 170private static void AppendToHash(IncrementalHash incrementalHash, Span<byte> buffer, ref byte[]? rented, string value)
CacheView\CacheViewKeyResolver.cs (12)
30using var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256); 93private static void AppendDelimitedQueryValues(IncrementalHash hash, string separatedValues, HttpRequest request) 107private static void AppendDelimitedRouteValues(IncrementalHash hash, string separatedValues, HttpRequest request) 129private static void AppendDelimitedHeaderValues(IncrementalHash hash, string separatedValues, HttpRequest request) 143private static void AppendDelimitedCookieValues(IncrementalHash hash, string separatedValues, HttpRequest request) 182private static void AppendAllQueryValues(IncrementalHash hash, HttpRequest request) 202private static void AppendUserIdentity(IncrementalHash hash, ClaimsPrincipal user) 236private static void AppendNameStringValues(IncrementalHash hash, string name, StringValues values) 252private static void AppendInt32(IncrementalHash hash, int value) 259private static void AppendLengthPrefixedString(IncrementalHash hash, string value) 268private static void AppendString(IncrementalHash hash, string? value)
Microsoft.AspNetCore.Razor.Utilities.Shared (5)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\Extensions.cs (5)
64public static PooledObject<IncrementalHash> GetPooledObject<T>(this ObjectPool<IncrementalHash> pool) 67public static PooledObject<IncrementalHash> GetPooledObject<T>( 68this ObjectPool<IncrementalHash> pool, 69out IncrementalHash hash)
Microsoft.CodeAnalysis (14)
CryptographicHashProvider.cs (8)
218using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 227using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 237using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 249using var incrementalHash = IncrementalHash.CreateHash(algorithmName);
Emit\EmitOptions.cs (1)
373IncrementalHash.CreateHash(PdbChecksumAlgorithm).Dispose();
InternalUtilities\IncrementalHashExtensions.cs (3)
14internal static void AppendData(this IncrementalHash hash, IEnumerable<Blob> blobs) 22internal static void AppendData(this IncrementalHash hash, IEnumerable<ArraySegment<byte>> blobs) 30internal static void AppendData(this IncrementalHash hash, ArraySegment<byte> segment)
PEWriter\SigningUtilities.cs (2)
36using (var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1))
Microsoft.DotNet.Build.Tasks.FileCatalog (6)
CatalogBuilder.cs (2)
241using IncrementalHash sha256 = IncrementalHash.CreateHash(HashAlgorithmName.SHA256);
CatalogEntry.cs (4)
36using IncrementalHash sha1 = IncrementalHash.CreateHash(HashAlgorithmName.SHA1); 37using IncrementalHash sha256 = IncrementalHash.CreateHash(HashAlgorithmName.SHA256);
Microsoft.DotNet.StrongName (2)
Utils.cs (2)
143using (var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1))
Microsoft.Extensions.AI.Abstractions (4)
Utilities\AIJsonUtilities.cs (4)
207/// <summary>Provides a stream that writes to an <see cref="IncrementalHash"/>.</summary> 215/// <summary>The <see cref="IncrementalHash"/> used by this instance.</summary> 216private readonly IncrementalHash _hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA384);
Microsoft.Extensions.FileProviders.Physical (3)
PollingWildCardChangeToken.cs (3)
120using (var sha256 = IncrementalHash.CreateHash(HashAlgorithmName.SHA256)) 176private static void ComputeHash(IncrementalHash sha256, string path, DateTime lastChangedUtc)
Microsoft.NET.Build.Containers (2)
Layer.cs (2)
236private readonly IncrementalHash sha256Hash; 241sha256Hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256);
netstandard (1)
netstandard.cs (1)
1889[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.IncrementalHash))]
NuGet.Packaging (2)
Sha512HashFunction.cs (2)
48private readonly IncrementalHash _hashFunc; 52_hashFunc = IncrementalHash.CreateHash(HashAlgorithmName.SHA512);
System.Core (1)
System.Core.cs (1)
229[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.IncrementalHash))]
System.IO.Compression (2)
System\IO\Compression\WinZipAesStream.cs (2)
22private IncrementalHash? _hmac; 195_hmac = IncrementalHash.CreateHMAC(HashAlgorithmName.SHA1, keyMaterial.HmacKey);
System.Net.Security (10)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (10)
471using (var hmac = IncrementalHash.CreateHMAC(HashAlgorithmName.MD5, ntlm2hash)) 497using (var md5 = IncrementalHash.CreateHash(HashAlgorithmName.MD5)) 620using (var md5 = IncrementalHash.CreateHash(HashAlgorithmName.MD5)) 755using (var hmacMic = IncrementalHash.CreateHMAC(HashAlgorithmName.MD5, exportedSessionKey)) 798using (var hmac = IncrementalHash.CreateHMAC(HashAlgorithmName.MD5, signingKey))
System.Security.Cryptography (55)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
76using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithm, derived))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (2)
205internal static IncrementalHash CreateIncrementalHash(HashAlgorithmName hashAlgorithmName) 209return IncrementalHash.CreateHash(hashAlgorithmName);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
197using (IncrementalHash hasher = IncrementalHash.CreateHash(digestAlgorithmName)) 847IncrementalHash hasher, 1019IncrementalHash hasher,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
168using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 208using (IncrementalHash mac = IncrementalHash.CreateHMAC(hashAlgorithm, macKey))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
158IncrementalHash hash = IncrementalHash.CreateHash(hashAlgorithm);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (7)
319using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName)) 424using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName)) 524using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName)) 588private static unsafe void Mgf1(IncrementalHash hasher, ReadOnlySpan<byte> mgfSeed, Span<byte> mask)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
1257using (IncrementalHash mac = IncrementalHash.CreateHMAC(hashAlgorithm, macKey))
System\Security\Cryptography\HKDFManagedImplementation.cs (3)
49using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithmName, prk)) 94private static void GetHashAndReset(IncrementalHash hmac, Span<byte> output)
System\Security\Cryptography\IncrementalHash.cs (16)
274/// Creates a new instance of <see cref="IncrementalHash" /> with the existing appended data preserved. 279public IncrementalHash Clone() 308VerifyCore(hash, this, static (IncrementalHash ih, Span<byte> buffer) => ih.GetCurrentHashCore(buffer)); 339VerifyCore(hash, this, static (IncrementalHash ih, Span<byte> buffer) => ih.GetHashAndResetCore(buffer)); 353/// <see cref="IncrementalHash"/> class. 373/// Creates an <see cref="IncrementalHash"/> for the algorithm specified by <paramref name="hashAlgorithm"/>. 377/// An <see cref="IncrementalHash"/> instance ready to compute the hash algorithm specified 385public static IncrementalHash CreateHash(HashAlgorithmName hashAlgorithm) 394/// Creates an <see cref="IncrementalHash"/> for the Hash-based Message Authentication Code (HMAC) 407/// An <see cref="IncrementalHash"/> instance ready to compute the hash algorithm specified 415public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, byte[] key) 423/// Creates an <see cref="IncrementalHash"/> for the Hash-based Message Authentication Code (HMAC) 436/// An <see cref="IncrementalHash"/> instance ready to compute the hash algorithm specified 444public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key) 473IncrementalHash ih, 474Func<IncrementalHash, Span<byte>, int> getHashCallback)
System\Security\Cryptography\MD5CryptoServiceProvider.cs (2)
13private readonly IncrementalHash _incrementalHash; 18_incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.MD5);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (3)
19private IncrementalHash _hmac; 245private IncrementalHash OpenHmac(ReadOnlySpan<byte> password) 266return IncrementalHash.CreateHMAC(hashAlgorithm, password);
System\Security\Cryptography\SHA1CryptoServiceProvider.cs (2)
16private readonly IncrementalHash _incrementalHash; 21_incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1);
System\Security\Cryptography\SHA256CryptoServiceProvider.cs (2)
16private readonly IncrementalHash _incrementalHash; 21_incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256);
System\Security\Cryptography\SHA384CryptoServiceProvider.cs (2)
16private readonly IncrementalHash _incrementalHash; 21_incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA384);
System\Security\Cryptography\SHA512CryptoServiceProvider.cs (2)
16private readonly IncrementalHash _incrementalHash; 21_incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA512);
System.Security.Cryptography.Algorithms (1)
System.Security.Cryptography.Algorithms.cs (1)
33[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.IncrementalHash))]
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\HashToBeSignedBuilder.cs (2)
14private IncrementalHash _incrementalHash; 18_incrementalHash = IncrementalHash.CreateHash(hashAlgorithmName);
System.Security.Cryptography.Pkcs (19)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
76using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithm, derived))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (2)
205internal static IncrementalHash CreateIncrementalHash(HashAlgorithmName hashAlgorithmName) 209return IncrementalHash.CreateHash(hashAlgorithmName);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
197using (IncrementalHash hasher = IncrementalHash.CreateHash(digestAlgorithmName)) 847IncrementalHash hasher, 1019IncrementalHash hasher,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
168using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 208using (IncrementalHash mac = IncrementalHash.CreateHMAC(hashAlgorithm, macKey))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
158IncrementalHash hash = IncrementalHash.CreateHash(hashAlgorithm);
System\Security\Cryptography\Pkcs\CmsHash.cs (1)
92private readonly IncrementalHash _incrementalHash;
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (2)
196using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm))
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (2)
176using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName))