4 instantiations of IncrementalHash
System.Security.Cryptography (4)
System\Security\Cryptography\IncrementalHash.cs (4)
285
new
IncrementalHash
(_algorithmName, _hash.Clone()) :
286
new
IncrementalHash
(_algorithmName, _hmac!.Clone());
328
return new
IncrementalHash
(hashAlgorithm, HashProviderDispenser.CreateHashProvider(hashAlgorithm.Name));
387
return new
IncrementalHash
(hashAlgorithm, new HMACCommon(hashAlgorithm.Name, key, -1));
142 references to IncrementalHash
Microsoft.AspNetCore.Components.Endpoints (3)
Builder\ResourceCollectionUrlEndpoint.cs (3)
113
var
incrementalHash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA256);
131
private static void AppendToHash(
IncrementalHash
incrementalHash, Span<byte> buffer, ref byte[]? rented, string value)
Microsoft.CodeAnalysis (14)
CryptographicHashProvider.cs (8)
200
using (
var
incrementalHash =
IncrementalHash
.CreateHash(algorithmName))
209
using (
var
incrementalHash =
IncrementalHash
.CreateHash(algorithmName))
219
using (
var
incrementalHash =
IncrementalHash
.CreateHash(algorithmName))
231
using
var
incrementalHash =
IncrementalHash
.CreateHash(algorithmName);
Emit\EmitOptions.cs (1)
371
IncrementalHash
.CreateHash(PdbChecksumAlgorithm).Dispose();
InternalUtilities\IncrementalHashExtensions.cs (3)
14
internal static void AppendData(this
IncrementalHash
hash, IEnumerable<Blob> blobs)
22
internal static void AppendData(this
IncrementalHash
hash, IEnumerable<ArraySegment<byte>> blobs)
30
internal static void AppendData(this
IncrementalHash
hash, ArraySegment<byte> segment)
PEWriter\SigningUtilities.cs (2)
36
using (
var
hash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA1))
Microsoft.CodeAnalysis.Test.Utilities (2)
Metadata\ILValidation.cs (2)
150
using (
var
hash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA1))
Microsoft.Extensions.FileProviders.Physical (3)
PollingWildCardChangeToken.cs (3)
118
using (
var
sha256 =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA256))
169
private 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)
417
using (
var
hmac =
IncrementalHash
.CreateHMAC(HashAlgorithmName.MD5, ntlm2hash))
443
using (
var
md5 =
IncrementalHash
.CreateHash(HashAlgorithmName.MD5))
554
using (
var
md5 =
IncrementalHash
.CreateHash(HashAlgorithmName.MD5))
679
using (
var
hmacMic =
IncrementalHash
.CreateHMAC(HashAlgorithmName.MD5, exportedSessionKey))
722
using (
var
hmac =
IncrementalHash
.CreateHMAC(HashAlgorithmName.MD5, signingKey))
System.Security.Cryptography (55)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
76
using (
IncrementalHash
hmac =
IncrementalHash
.CreateHMAC(hashAlgorithm, derived))
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (7)
14
internal delegate byte[]? DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKey,
IncrementalHash
? hasher);
26
using (
IncrementalHash
hash =
IncrementalHash
.CreateHash(hashAlgorithm))
70
using (
IncrementalHash
hash =
IncrementalHash
.CreateHMAC(hashAlgorithm, hmacKey))
194
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHMAC(algorithmName, secret))
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (1)
86
private byte[]? DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKey,
IncrementalHash
? hasher)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
169
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(digestAlgorithmName))
806
IncrementalHash
hasher,
977
IncrementalHash
hasher,
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
158
IncrementalHash
hash =
IncrementalHash
.CreateHash(hashAlgorithm);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (7)
319
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithmName))
423
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithmName))
522
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithmName))
585
private static void Mgf1(
IncrementalHash
hasher, ReadOnlySpan<byte> mgfSeed, Span<byte> mask)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
946
using (
IncrementalHash
mac =
IncrementalHash
.CreateHMAC(hashAlgorithm, macKey))
System\Security\Cryptography\HKDFManagedImplementation.cs (3)
50
using (
IncrementalHash
hmac =
IncrementalHash
.CreateHMAC(hashAlgorithmName, prk))
95
private 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.
279
public
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
323
public 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
353
public 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
382
public static
IncrementalHash
CreateHMAC(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key)
System\Security\Cryptography\MD5CryptoServiceProvider.cs (2)
13
private readonly
IncrementalHash
_incrementalHash;
18
_incrementalHash =
IncrementalHash
.CreateHash(HashAlgorithmName.MD5);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (3)
19
private
IncrementalHash
_hmac;
242
private
IncrementalHash
OpenHmac(ReadOnlySpan<byte> password)
263
return
IncrementalHash
.CreateHMAC(hashAlgorithm, password);
System\Security\Cryptography\SHA1CryptoServiceProvider.cs (2)
16
private readonly
IncrementalHash
_incrementalHash;
21
_incrementalHash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA1);
System\Security\Cryptography\SHA256CryptoServiceProvider.cs (2)
16
private readonly
IncrementalHash
_incrementalHash;
21
_incrementalHash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA256);
System\Security\Cryptography\SHA384CryptoServiceProvider.cs (2)
16
private readonly
IncrementalHash
_incrementalHash;
21
_incrementalHash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA384);
System\Security\Cryptography\SHA512CryptoServiceProvider.cs (2)
16
private readonly
IncrementalHash
_incrementalHash;
21
_incrementalHash =
IncrementalHash
.CreateHash(HashAlgorithmName.SHA512);
System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs (2)
41
using (
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)
42
internal static void WriteByteStringLength(
IncrementalHash
hasher, ulong value)
107
internal static int SignHash(CoseSigner signer,
IncrementalHash
hasher, Span<byte> destination)
124
private static int SignHashWithECDsa(ECDsa key,
IncrementalHash
hasher, Span<byte> destination)
145
private static int SignHashWithRSA(RSA key,
IncrementalHash
hasher, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, Span<byte> destination)
350
internal static void WriteSignature(Span<byte> buffer,
IncrementalHash
hasher, CborWriter writer, CoseSigner signer)
System\Security\Cryptography\Cose\CoseMessage.cs (2)
410
IncrementalHash
hasher,
456
IncrementalHash
hasher,
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (8)
461
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(signer.HashAlgorithm))
490
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
801
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(signer.HashAlgorithm))
874
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(signer.HashAlgorithm))
System\Security\Cryptography\Cose\CoseSign1Message.cs (9)
334
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(signer.HashAlgorithm))
356
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(signer.HashAlgorithm))
621
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
722
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
741
private bool VerifyHash(AsymmetricAlgorithm key,
IncrementalHash
hasher, HashAlgorithmName hashAlgorithm, KeyType keyType, RSASignaturePadding? padding)
System\Security\Cryptography\Cose\CoseSignature.cs (5)
397
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
429
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
451
private 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)
76
using (
IncrementalHash
hmac =
IncrementalHash
.CreateHMAC(hashAlgorithm, derived))
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
169
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(digestAlgorithmName))
806
IncrementalHash
hasher,
977
IncrementalHash
hasher,
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
158
IncrementalHash
hash =
IncrementalHash
.CreateHash(hashAlgorithm);
System\Security\Cryptography\Pkcs\CmsSigner.cs (2)
188
IncrementalHash
hasher;
192
hasher =
IncrementalHash
.CreateHash(hashAlgorithmName);
System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
177
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
217
using (
IncrementalHash
mac =
IncrementalHash
.CreateHMAC(hashAlgorithm, macKey))
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (2)
199
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithm))
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (2)
182
using (
IncrementalHash
hasher =
IncrementalHash
.CreateHash(hashAlgorithmName))
System\Security\Cryptography\Pkcs\SignerInfo.cs (5)
474
using (
IncrementalHash
? hasher = PrepareDigest(compatMode))
549
private
IncrementalHash
? PrepareDigest(bool compatMode)
554
IncrementalHash
hasher;
558
hasher =
IncrementalHash
.CreateHash(hashAlgorithmName);
749
using (
IncrementalHash
? hasher = PrepareDigest(compatMode))