4 instantiations of IncrementalHash
System.Security.Cryptography (4)
System\Security\Cryptography\IncrementalHash.cs (4)
285new IncrementalHash(_algorithmName, _hash.Clone()) : 286new IncrementalHash(_algorithmName, _hmac!.Clone()); 328return new IncrementalHash(hashAlgorithm, HashProviderDispenser.CreateHashProvider(hashAlgorithm.Name)); 387return new IncrementalHash(hashAlgorithm, new HMACCommon(hashAlgorithm.Name, key, -1));
142 references to IncrementalHash
Microsoft.AspNetCore.Components.Endpoints (3)
Builder\ResourceCollectionUrlEndpoint.cs (3)
113var incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256); 131private static void AppendToHash(IncrementalHash incrementalHash, Span<byte> buffer, ref byte[]? rented, string value)
Microsoft.CodeAnalysis (14)
CryptographicHashProvider.cs (8)
200using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 209using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 219using (var incrementalHash = IncrementalHash.CreateHash(algorithmName)) 231using var incrementalHash = IncrementalHash.CreateHash(algorithmName);
Emit\EmitOptions.cs (1)
371IncrementalHash.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.CodeAnalysis.Test.Utilities (2)
Metadata\ILValidation.cs (2)
150using (var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1))
Microsoft.Extensions.FileProviders.Physical (3)
PollingWildCardChangeToken.cs (3)
118using (var sha256 = IncrementalHash.CreateHash(HashAlgorithmName.SHA256)) 169private void ComputeHash(IncrementalHash sha256, string path, DateTime lastChangedUtc)
netstandard (1)
netstandard.cs (1)
1889[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.IncrementalHash))]
System.Core (1)
System.Core.cs (1)
228[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.IncrementalHash))]
System.Net.Security (10)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (10)
417using (var hmac = IncrementalHash.CreateHMAC(HashAlgorithmName.MD5, ntlm2hash)) 443using (var md5 = IncrementalHash.CreateHash(HashAlgorithmName.MD5)) 554using (var md5 = IncrementalHash.CreateHash(HashAlgorithmName.MD5)) 679using (var hmacMic = IncrementalHash.CreateHMAC(HashAlgorithmName.MD5, exportedSessionKey)) 722using (var hmac = IncrementalHash.CreateHMAC(HashAlgorithmName.MD5, signingKey))
System.Security.Cryptography (55)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
76using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithm, derived))
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (7)
14internal delegate byte[]? DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKey, IncrementalHash? hasher); 26using (IncrementalHash hash = IncrementalHash.CreateHash(hashAlgorithm)) 70using (IncrementalHash hash = IncrementalHash.CreateHMAC(hashAlgorithm, hmacKey)) 194using (IncrementalHash hasher = IncrementalHash.CreateHMAC(algorithmName, secret))
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (1)
86private byte[]? DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKey, IncrementalHash? hasher)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
169using (IncrementalHash hasher = IncrementalHash.CreateHash(digestAlgorithmName)) 806IncrementalHash hasher, 977IncrementalHash hasher,
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
158IncrementalHash hash = IncrementalHash.CreateHash(hashAlgorithm);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (7)
319using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName)) 423using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName)) 522using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName)) 585private static void Mgf1(IncrementalHash hasher, ReadOnlySpan<byte> mgfSeed, Span<byte> mask)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
946using (IncrementalHash mac = IncrementalHash.CreateHMAC(hashAlgorithm, macKey))
System\Security\Cryptography\HKDFManagedImplementation.cs (3)
50using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithmName, prk)) 95private static void GetHashAndReset(IncrementalHash hmac, Span<byte> output)
System\Security\Cryptography\IncrementalHash.cs (12)
274/// Creates a new instance of <see cref="IncrementalHash" /> with the existing appended data preserved. 279public IncrementalHash Clone() 291/// <see cref="IncrementalHash"/> class. 311/// Creates an <see cref="IncrementalHash"/> for the algorithm specified by <paramref name="hashAlgorithm"/>. 315/// An <see cref="IncrementalHash"/> instance ready to compute the hash algorithm specified 323public static IncrementalHash CreateHash(HashAlgorithmName hashAlgorithm) 332/// Creates an <see cref="IncrementalHash"/> for the Hash-based Message Authentication Code (HMAC) 345/// An <see cref="IncrementalHash"/> instance ready to compute the hash algorithm specified 353public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, byte[] key) 361/// Creates an <see cref="IncrementalHash"/> for the Hash-based Message Authentication Code (HMAC) 374/// An <see cref="IncrementalHash"/> instance ready to compute the hash algorithm specified 382public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key)
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; 242private IncrementalHash OpenHmac(ReadOnlySpan<byte> password) 263return 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\SP800108HmacCounterKdfImplementationManaged.cs (2)
41using (IncrementalHash hash = IncrementalHash.CreateHMAC(hashAlgorithm, key))
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 (29)
System\Security\Cryptography\Cose\CoseHelpers.cs (5)
42internal static void WriteByteStringLength(IncrementalHash hasher, ulong value) 107internal static int SignHash(CoseSigner signer, IncrementalHash hasher, Span<byte> destination) 124private static int SignHashWithECDsa(ECDsa key, IncrementalHash hasher, Span<byte> destination) 145private static int SignHashWithRSA(RSA key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, Span<byte> destination) 350internal static void WriteSignature(Span<byte> buffer, IncrementalHash hasher, CborWriter writer, CoseSigner signer)
System\Security\Cryptography\Cose\CoseMessage.cs (2)
410IncrementalHash hasher, 456IncrementalHash hasher,
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (8)
461using (IncrementalHash hasher = IncrementalHash.CreateHash(signer.HashAlgorithm)) 490using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 801using (IncrementalHash hasher = IncrementalHash.CreateHash(signer.HashAlgorithm)) 874using (IncrementalHash hasher = IncrementalHash.CreateHash(signer.HashAlgorithm))
System\Security\Cryptography\Cose\CoseSign1Message.cs (9)
334using (IncrementalHash hasher = IncrementalHash.CreateHash(signer.HashAlgorithm)) 356using (IncrementalHash hasher = IncrementalHash.CreateHash(signer.HashAlgorithm)) 621using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 722using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 741private bool VerifyHash(AsymmetricAlgorithm key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding)
System\Security\Cryptography\Cose\CoseSignature.cs (5)
397using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 429using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 451private bool VerifyHash(AsymmetricAlgorithm key, IncrementalHash hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding)
System.Security.Cryptography.Pkcs (23)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
76using (IncrementalHash hmac = IncrementalHash.CreateHMAC(hashAlgorithm, derived))
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
169using (IncrementalHash hasher = IncrementalHash.CreateHash(digestAlgorithmName)) 806IncrementalHash hasher, 977IncrementalHash hasher,
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
158IncrementalHash hash = IncrementalHash.CreateHash(hashAlgorithm);
System\Security\Cryptography\Pkcs\CmsSigner.cs (2)
188IncrementalHash hasher; 192hasher = IncrementalHash.CreateHash(hashAlgorithmName);
System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
177using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm)) 217using (IncrementalHash mac = IncrementalHash.CreateHMAC(hashAlgorithm, macKey))
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (2)
199using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithm))
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (2)
182using (IncrementalHash hasher = IncrementalHash.CreateHash(hashAlgorithmName))
System\Security\Cryptography\Pkcs\SignerInfo.cs (5)
474using (IncrementalHash? hasher = PrepareDigest(compatMode)) 549private IncrementalHash? PrepareDigest(bool compatMode) 554IncrementalHash hasher; 558hasher = IncrementalHash.CreateHash(hashAlgorithmName); 749using (IncrementalHash? hasher = PrepareDigest(compatMode))