9 types derived from HashAlgorithm
System.Security.Cryptography (9)
System\Security\Cryptography\KeyedHashAlgorithm.cs (1)
9public abstract class KeyedHashAlgorithm : HashAlgorithm
System\Security\Cryptography\MD5.cs (1)
20public abstract class MD5 : HashAlgorithm
System\Security\Cryptography\SHA1.cs (1)
19public abstract class SHA1 : HashAlgorithm
System\Security\Cryptography\SHA256.cs (1)
19public abstract class SHA256 : HashAlgorithm
System\Security\Cryptography\SHA3_256.cs (1)
19public abstract class SHA3_256 : HashAlgorithm
System\Security\Cryptography\SHA3_384.cs (1)
19public abstract class SHA3_384 : HashAlgorithm
System\Security\Cryptography\SHA3_512.cs (1)
19public abstract class SHA3_512 : HashAlgorithm
System\Security\Cryptography\SHA384.cs (1)
19public abstract class SHA384 : HashAlgorithm
System\Security\Cryptography\SHA512.cs (1)
19public abstract class SHA512 : HashAlgorithm
108 references to HashAlgorithm
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\IdentityModel\HashStream.cs (2)
21public HashStream(HashAlgorithm hash) 94public void Reset(HashAlgorithm hash)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
184private HashAlgorithm HashAlgorithm
Microsoft.AspNetCore.DataProtection (6)
Managed\AesGcmAuthenticatedEncryptor.cs (1)
38private static readonly Func<byte[], HashAlgorithm> _kdkPrfFactory = key => new HMACSHA512(key); // currently hardcoded to SHA512
Managed\HashAlgorithmExtensions.cs (1)
11public static int GetDigestSizeInBytes(this HashAlgorithm hashAlgorithm)
Managed\ManagedAuthenticatedEncryptor.cs (1)
29private static readonly Func<byte[], HashAlgorithm> _kdkPrfFactory = key => new HMACSHA512(key); // currently hardcoded to SHA512
SP800_108\ManagedSP800_108_CTR_HMACSHA512.cs (3)
13public static void DeriveKeys(byte[] kdk, ArraySegment<byte> label, ArraySegment<byte> context, Func<byte[], HashAlgorithm> prfFactory, ArraySegment<byte> output) 19using (var prf = prfFactory(kdk)) 58public static void DeriveKeysWithContextHeader(byte[] kdk, ArraySegment<byte> label, byte[] contextHeader, ArraySegment<byte> context, Func<byte[], HashAlgorithm> prfFactory, ArraySegment<byte> output)
Microsoft.Build.Tasks.Core (8)
FileIO\GetFileHash.cs (4)
26internal static readonly Dictionary<string, Func<HashAlgorithm>> SupportedAlgorithms 27= new Dictionary<string, Func<HashAlgorithm>>(StringComparer.OrdinalIgnoreCase) 141internal static byte[] ComputeHash(Func<HashAlgorithm> algorithmFactory, string filePath, CancellationToken ct) 144using (var algorithm = algorithmFactory())
Hash.cs (3)
64using (var sha = CreateHashAlgorithm()) 122private HashAlgorithm CreateHashAlgorithm() 137private int AddBytesToShaBuffer(HashAlgorithm sha, byte[] shaBuffer, int shaBufferPosition, int shaBufferSize, byte[] byteBuffer, int byteCount)
ManifestUtil\Util.cs (1)
241HashAlgorithm hashAlg = null;
Microsoft.CodeAnalysis (11)
CryptographicHashProvider.cs (5)
29internal abstract ImmutableArray<byte> ComputeHash(HashAlgorithm algorithm); 33using (HashAlgorithm? algorithm = TryGetAlgorithm(algorithmId)) 80internal static HashAlgorithm? TryGetAlgorithm(SourceHashAlgorithm algorithmId) 112internal static HashAlgorithm? TryGetAlgorithm(AssemblyHashAlgorithm algorithmId) 156private ImmutableArray<byte> GetHash(ref ImmutableArray<byte> lazyHash, HashAlgorithm algorithm)
MetadataReader\PEModule.cs (1)
177internal override unsafe ImmutableArray<byte> ComputeHash(HashAlgorithm algorithm)
ResourceDescription.cs (1)
110internal override ImmutableArray<byte> ComputeHash(HashAlgorithm algorithm)
Text\SourceHashAlgorithms.cs (2)
49private static HashAlgorithm CreateInstance(SourceHashAlgorithm algorithm) 60public static HashAlgorithm CreateDefaultInstance()
Text\SourceText.cs (2)
685using (var algorithm = CryptographicHashProvider.TryGetAlgorithm(algorithmId)) 694using (var algorithm = CryptographicHashProvider.TryGetAlgorithm(algorithmId))
Microsoft.CodeAnalysis.CSharp (1)
Symbols\FileIdentifier.cs (1)
48using var hashAlgorithm = SourceHashAlgorithms.CreateDefaultInstance();
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\Text\SourceHashAlgorithms.cs (2)
49private static HashAlgorithm CreateInstance(SourceHashAlgorithm algorithm) 60public static HashAlgorithm CreateDefaultInstance()
Microsoft.DotNet.Arcade.Sdk (1)
src\GenerateChecksums.cs (1)
44using(HashAlgorithm hashAlgorithm = SHA512.Create())
Microsoft.DotNet.Build.Tasks.Workloads (3)
Utils.cs (3)
20/// <param name="hashName">The name of the <see cref="HashAlgorithm"/> to use.</param> 26HashAlgorithm algorithm = HashAlgorithm.Create(hashName.Name);
Microsoft.DotNet.SignCheckLibrary (11)
Utils.cs (3)
17/// <param name="hashName">The name of the <see cref="HashAlgorithm"/> to use.</param> 22HashAlgorithm ha = HashAlgorithm.Create(hashName);
Verification\Jar\JarManifestFile.cs (4)
51HashAlgorithm ha = HashAlgorithm.Create(entry.HashAlgorithmName); 68using (HashAlgorithm hashAlgorithm = HashAlgorithm.Create(algorithmName))
Verification\Jar\JarManifestFileBase.cs (2)
133using (HashAlgorithm hashAlgorithm = HashAlgorithm.Create(algorithmName))
Verification\Jar\JarUtils.cs (2)
51using (HashAlgorithm hashAlgorithm = HashAlgorithm.Create(algorithmName))
Microsoft.Extensions.Identity.Core (1)
Rfc6238AuthenticationService.cs (1)
27HashAlgorithm hashAlgorithm,
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
882[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HashAlgorithm))]
netstandard (1)
netstandard.cs (1)
1879[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HashAlgorithm))]
PresentationBuildTasks (1)
MS\Internal\Tasks\TaskFileService.cs (1)
181HashAlgorithm hashAlgorithm;
System.Security.Cryptography (15)
System\Security\Cryptography\AsymmetricSignatureDeformatter.cs (1)
15public virtual bool VerifySignature(HashAlgorithm hash, byte[] rgbSignature)
System\Security\Cryptography\AsymmetricSignatureFormatter.cs (1)
15public virtual byte[] CreateSignature(HashAlgorithm hash)
System\Security\Cryptography\CapiHelper.Unix.cs (2)
16HashAlgorithm hashAlgorithm => AlgorithmToHashAlgorithmName(hashAlgorithm), 38private static HashAlgorithmName AlgorithmToHashAlgorithmName(HashAlgorithm hashAlgorithm)
System\Security\Cryptography\CryptoConfigForwarder.cs (1)
58internal static HashAlgorithm CreateDefaultHashAlgorithm() =>
System\Security\Cryptography\HashAlgorithm.cs (3)
22public static HashAlgorithm Create() => 27public static HashAlgorithm? Create(string hashName) => 28CryptoConfigForwarder.CreateFromName<HashAlgorithm>(hashName);
System\Security\Cryptography\HashAlgorithmNames.cs (1)
31public static string? ToAlgorithmName(this HashAlgorithm hashAlgorithm)
System\Security\Cryptography\PasswordDeriveBytes.cs (2)
27private HashAlgorithm? _hash; 80_hash = (HashAlgorithm?)CryptoConfig.CreateFromName(_hashName);
System\Security\Cryptography\PKCS1MaskGenerationMethod.cs (2)
29using (HashAlgorithm? hasher = CryptoConfig.CreateFromName(_hashNameValue) as HashAlgorithm)
System\Security\Cryptography\SignatureDescription.cs (2)
46public virtual HashAlgorithm? CreateDigest() 48return (HashAlgorithm?)CryptoConfig.CreateFromName(DigestAlgorithm!);
System.Security.Cryptography.Primitives (1)
System.Security.Cryptography.Primitives.cs (1)
14[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HashAlgorithm))]
System.Security.Cryptography.Xml (37)
System\Security\Cryptography\Xml\CanonicalizationDispatcher.cs (2)
39public static void WriteHash(XmlNode node, HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc) 51public static void WriteHashGenericNode(XmlNode node, HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXml.cs (1)
114internal byte[] GetDigestedBytes(HashAlgorithm hash)
System\Security\Cryptography\Xml\CanonicalXmlAttribute.cs (1)
33public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlCDataSection.cs (1)
30public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlComment.cs (1)
47public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlDocument.cs (1)
47public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlElement.cs (1)
98public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlEntityReference.cs (1)
32public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlProcessingInstruction.cs (1)
42public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlSignificantWhitespace.cs (1)
32public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlText.cs (1)
32public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\CanonicalXmlWhitespace.cs (1)
32public void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc)
System\Security\Cryptography\Xml\DSASignatureDescription.cs (1)
45public sealed override HashAlgorithm CreateDigest()
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (1)
67internal byte[] GetDigestedBytes(HashAlgorithm hash)
System\Security\Cryptography\Xml\ICanonicalizableNode.cs (1)
19void WriteHash(HashAlgorithm hash, DocPosition docPos, AncestralNamespaceContextManager anc);
System\Security\Cryptography\Xml\Reference.cs (2)
21private HashAlgorithm? _hashAlgorithm; 365_hashAlgorithm = CryptoHelpers.CreateNonTransformFromName<HashAlgorithm>(_digestMethod);
System\Security\Cryptography\Xml\RSAPKCS1SHA1SignatureDescription.cs (1)
17public sealed override HashAlgorithm CreateDigest()
System\Security\Cryptography\Xml\RSAPKCS1SHA256SignatureDescription.cs (1)
16public sealed override HashAlgorithm CreateDigest()
System\Security\Cryptography\Xml\RSAPKCS1SHA384SignatureDescription.cs (1)
16public sealed override HashAlgorithm CreateDigest()
System\Security\Cryptography\Xml\RSAPKCS1SHA512SignatureDescription.cs (1)
16public sealed override HashAlgorithm CreateDigest()
System\Security\Cryptography\Xml\RSAPKCS1SignatureDescription.cs (1)
43public abstract override HashAlgorithm CreateDigest();
System\Security\Cryptography\Xml\SignedXml.cs (3)
424HashAlgorithm? hashAlg = signatureDescription.CreateDigest(); 792private byte[] GetC14NDigest(HashAlgorithm hash) 1038HashAlgorithm? hashAlgorithm = signatureDescription.CreateDigest();
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (8)
632HashAlgorithm hash, 692HashAlgorithm? hashAlgorithm = CryptoHelpers.CreateNonTransformFromName<HashAlgorithm>(reference.DigestMethod); 828HashAlgorithm? hashAlgorithm = CryptoHelpers.CreateNonTransformFromName<HashAlgorithm>(reference.DigestMethod); 859HashAlgorithm hashAlgorithm, 1043HashAlgorithm? hashAlgorithm = CryptoHelpers.CreateNonTransformFromName<HashAlgorithm>(reference.DigestMethod);
System\Security\Cryptography\Xml\Transform.cs (1)
154public virtual byte[] GetDigestedOutput(HashAlgorithm hash)
System\Security\Cryptography\Xml\XmlDsigC14NTransform.cs (1)
83public override byte[] GetDigestedOutput(HashAlgorithm hash)
System\Security\Cryptography\Xml\XmlDsigExcC14NTransform.cs (1)
120public override byte[] GetDigestedOutput(HashAlgorithm hash)
System.Security.Permissions (3)
System\Security\Policy\Hash.cs (1)
19public byte[] GenerateHash(HashAlgorithm hashAlg) { return null; }
System\Security\Policy\HashMembershipCondition.cs (2)
11public HashMembershipCondition(HashAlgorithm hashAlg, byte[] value) { } 12public HashAlgorithm HashAlgorithm { get; set; }
System.ServiceModel.NetNamedPipe (2)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (2)
363using (HashAlgorithm hash = GetHashAlgorithm()) 394private static HashAlgorithm GetHashAlgorithm()