4 instantiations of HashAlgorithmName
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
403pdbChecksumAlgorithm: new HashAlgorithmName("invalid hash algorithm name"));
Microsoft.CodeAnalysis.UnitTests (1)
Emit\EmitOptionsTests.cs (1)
60TestProperty((old, value) => old.WithPdbChecksumAlgorithm(value), opt => opt.PdbChecksumAlgorithm, new HashAlgorithmName());
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
501pdbChecksumAlgorithm:=New HashAlgorithmName("invalid hash algorithm name")) 517Dim options = New EmitOptions(pdbChecksumAlgorithm:=New HashAlgorithmName())
453 references to HashAlgorithmName
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
692certThumbprint ??= context.ClientCertificate.GetCertHashString(HashAlgorithmName.SHA256);
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
334HashAlgorithmName.SHA256,
Aspire.Dashboard.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
334HashAlgorithmName.SHA256,
dotnet-dev-certs (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
HttpStress (1)
Program.cs (1)
398var certReq = new CertificateRequest($"CN={LocalhostName}", rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
31parentKey, HashAlgorithmName.SHA256,
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
31parentKey, HashAlgorithmName.SHA256,
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
31parentKey, HashAlgorithmName.SHA256,
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
31parentKey, HashAlgorithmName.SHA256,
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
31parentKey, HashAlgorithmName.SHA256,
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
31parentKey, HashAlgorithmName.SHA256,
InMemory.FunctionalTests (6)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (6)
210var req = new CertificateRequest(subjectName, _cert.PublicKey, HashAlgorithmName.SHA256); 262HashAlgorithmName.SHA256, 347HashAlgorithmName.SHA256, 481key.SignData(tbsCertList, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); 634HashAlgorithmName.SHA256, 823HashAlgorithmName.SHA256,
Microsoft.AspNetCore.Authentication.Certificate (1)
CertificateValidationCache.cs (1)
66=> certificate.GetCertHashString(HashAlgorithmName.SHA256);
Microsoft.AspNetCore.Authentication.Test (1)
src\Shared\test\Certificates\Certificates.cs (1)
85HashAlgorithmName.SHA256,
Microsoft.AspNetCore.Components.Endpoints (1)
Builder\ResourceCollectionUrlEndpoint.cs (1)
113var incrementalHash = IncrementalHash.CreateHash(HashAlgorithmName.SHA256);
Microsoft.AspNetCore.Cryptography.KeyDerivation (4)
PBKDF2\NetCorePbkdf2Provider.cs (4)
24HashAlgorithmName algorithmName; 28algorithmName = HashAlgorithmName.SHA1; 31algorithmName = HashAlgorithmName.SHA256; 34algorithmName = HashAlgorithmName.SHA512;
Microsoft.AspNetCore.DeveloperCertificates.XPlat (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (1)
CertificateManagerTests.cs (1)
304var csr = new CertificateRequest(httpsCertificate.Subject + "Not", privateKey, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Microsoft.AspNetCore.HttpOverrides.Tests (1)
src\Shared\test\Certificates\Certificates.cs (1)
85HashAlgorithmName.SHA256,
Microsoft.AspNetCore.Identity (17)
Passkeys\CredentialPublicKey.cs (17)
187private static HashAlgorithmName HashAlgFromCOSEAlg(COSEAlgorithmIdentifier alg) 191COSEAlgorithmIdentifier.RS1 => HashAlgorithmName.SHA1, 192COSEAlgorithmIdentifier.ES256 => HashAlgorithmName.SHA256, 193COSEAlgorithmIdentifier.ES384 => HashAlgorithmName.SHA384, 194COSEAlgorithmIdentifier.ES512 => HashAlgorithmName.SHA512, 195COSEAlgorithmIdentifier.PS256 => HashAlgorithmName.SHA256, 196COSEAlgorithmIdentifier.PS384 => HashAlgorithmName.SHA384, 197COSEAlgorithmIdentifier.PS512 => HashAlgorithmName.SHA512, 198COSEAlgorithmIdentifier.RS256 => HashAlgorithmName.SHA256, 199COSEAlgorithmIdentifier.RS384 => HashAlgorithmName.SHA384, 200COSEAlgorithmIdentifier.RS512 => HashAlgorithmName.SHA512, 201COSEAlgorithmIdentifier.ES256K => HashAlgorithmName.SHA256, 202(COSEAlgorithmIdentifier)4 => HashAlgorithmName.SHA1, 203(COSEAlgorithmIdentifier)11 => HashAlgorithmName.SHA256, 204(COSEAlgorithmIdentifier)12 => HashAlgorithmName.SHA384, 205(COSEAlgorithmIdentifier)13 => HashAlgorithmName.SHA512, 206COSEAlgorithmIdentifier.EdDSA => HashAlgorithmName.SHA512,
Microsoft.AspNetCore.Identity.Test (14)
Passkeys\CredentialKeyPair.cs (14)
72var hashAlgorithm = GetHashAlgorithmFromCoseAlg(_alg); 85var hashAlgorithm = GetHashAlgorithmFromCoseAlg(_alg); 159private static HashAlgorithmName GetHashAlgorithmFromCoseAlg(COSEAlgorithmIdentifier alg) 163COSEAlgorithmIdentifier.RS1 => HashAlgorithmName.SHA1, 164COSEAlgorithmIdentifier.ES256 => HashAlgorithmName.SHA256, 165COSEAlgorithmIdentifier.ES384 => HashAlgorithmName.SHA384, 166COSEAlgorithmIdentifier.ES512 => HashAlgorithmName.SHA512, 167COSEAlgorithmIdentifier.PS256 => HashAlgorithmName.SHA256, 168COSEAlgorithmIdentifier.PS384 => HashAlgorithmName.SHA384, 169COSEAlgorithmIdentifier.PS512 => HashAlgorithmName.SHA512, 170COSEAlgorithmIdentifier.RS256 => HashAlgorithmName.SHA256, 171COSEAlgorithmIdentifier.RS384 => HashAlgorithmName.SHA384, 172COSEAlgorithmIdentifier.RS512 => HashAlgorithmName.SHA512, 173COSEAlgorithmIdentifier.ES256K => HashAlgorithmName.SHA256,
Microsoft.AspNetCore.Server.Kestrel.Core (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (6)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (6)
210var req = new CertificateRequest(subjectName, _cert.PublicKey, HashAlgorithmName.SHA256); 262HashAlgorithmName.SHA256, 347HashAlgorithmName.SHA256, 481key.SignData(tbsCertList, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); 634HashAlgorithmName.SHA256, 823HashAlgorithmName.SHA256,
Microsoft.AspNetCore.Testing (1)
FakeSslCertificateFactory.cs (1)
28HashAlgorithmName.SHA256,
Microsoft.CodeAnalysis (17)
CryptographicHashProvider.cs (7)
96internal static HashAlgorithmName GetAlgorithmName(SourceHashAlgorithm algorithmId) 102return HashAlgorithmName.SHA1; 105return HashAlgorithmName.SHA256; 198internal static ImmutableArray<byte> ComputeHash(HashAlgorithmName algorithmName, IEnumerable<Blob> bytes) 207internal static ImmutableArray<byte> ComputeHash(HashAlgorithmName algorithmName, IEnumerable<ArraySegment<byte>> bytes) 218var algorithmName = GetAlgorithmName(hashAlgorithm); 230var algorithmName = GetAlgorithmName(hashAlgorithm);
Emit\CommonPEModuleBuilder.cs (1)
78internal HashAlgorithmName PdbChecksumAlgorithm => EmitOptions.PdbChecksumAlgorithm;
Emit\EmitOptions.cs (5)
99public HashAlgorithmName PdbChecksumAlgorithm { get; private set; } 199HashAlgorithmName? pdbChecksumAlgorithm) 232HashAlgorithmName? pdbChecksumAlgorithm = null, 248PdbChecksumAlgorithm = pdbChecksumAlgorithm ?? HashAlgorithmName.SHA256; 422public EmitOptions WithPdbChecksumAlgorithm(HashAlgorithmName name)
NativePdbWriter\PdbWriter.cs (2)
29private readonly HashAlgorithmName _hashAlgorithmNameOpt; 43public PdbWriter(string fileName, Func<ISymWriterMetadataProvider, SymUnmanagedWriter> symWriterFactory, HashAlgorithmName hashAlgorithmNameOpt)
PEWriter\SigningUtilities.cs (2)
28var signature = rsa.SignHash(hash, HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1); 36using (var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1))
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCommandLineParser.cs (1)
1526pdbChecksumAlgorithm: HashAlgorithmName.SHA256,
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
5812Assert.Equal(HashAlgorithmName.SHA256, parsedArgs.EmitOptions.PdbChecksumAlgorithm); 5817Assert.Equal(HashAlgorithmName.SHA256, parsedArgs.EmitOptions.PdbChecksumAlgorithm); 5823Assert.Equal(HashAlgorithmName.SHA256, parsedArgs.EmitOptions.PdbChecksumAlgorithm);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\DeterministicTests.cs (1)
490.WithPdbChecksumAlgorithm(HashAlgorithmName.SHA256);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
PDB\PortablePdbTests.cs (2)
171WithPdbChecksumAlgorithm(HashAlgorithmName.SHA512)); 230WithPdbChecksumAlgorithm(HashAlgorithmName.SHA384).
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
425var options = new EmitOptions(pdbChecksumAlgorithm: default(HashAlgorithmName));
Microsoft.CodeAnalysis.Scripting (1)
ScriptBuilder.cs (1)
53pdbChecksumAlgorithm: default(HashAlgorithmName));
Microsoft.CodeAnalysis.Test.Utilities (3)
Metadata\ILValidation.cs (2)
112if (!rsa.VerifyHash(hash, reversedSignature, HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1)) 152using (var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1))
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
38pdbChecksumAlgorithm: HashAlgorithmName.SHA256,
Microsoft.CodeAnalysis.UnitTests (3)
Emit\EmitOptionsTests.cs (3)
61TestProperty((old, value) => old.WithPdbChecksumAlgorithm(value), opt => opt.PdbChecksumAlgorithm, HashAlgorithmName.SHA384); 142pdbChecksumAlgorithm: HashAlgorithmName.MD5); // CodeQL [SM02196] This is testing an algorithm that our codebase must support for PDBs 145Assert.Equal(options2, options3.WithPdbChecksumAlgorithm(HashAlgorithmName.SHA256));
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCommandLineParser.vb (1)
1464pdbChecksumAlgorithm:=HashAlgorithmName.SHA256) ' TODO: set from /checksumalgorithm (see https://github.com/dotnet/roslyn/issues/24735)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
CommandLineTests.vb (3)
1896Assert.Equal(HashAlgorithmName.SHA256, parsedArgs.EmitOptions.PdbChecksumAlgorithm) 1901Assert.Equal(HashAlgorithmName.SHA256, parsedArgs.EmitOptions.PdbChecksumAlgorithm) 1906Assert.Equal(HashAlgorithmName.SHA256, parsedArgs.EmitOptions.PdbChecksumAlgorithm)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
PDB\PortablePdbTests.vb (2)
81WithPdbChecksumAlgorithm(HashAlgorithmName.SHA512)) 133WithPdbChecksumAlgorithm(HashAlgorithmName.SHA384).
Microsoft.DotNet.Build.Tasks.Workloads (3)
Msi\MsiBase.wix.cs (1)
96protected string OutputName => $"{Utils.GetTruncatedHash(BaseOutputName, HashAlgorithmName.SHA256)}-{Platform}.msi";
Swix\MsiSwixProject.wix.cs (1)
90ProjectFile = $"{Utils.GetTruncatedHash(hashInputs, HashAlgorithmName.SHA256)}.swixproj";
Utils.cs (1)
22public static string GetTruncatedHash(string value, HashAlgorithmName hashName)
Microsoft.DotNet.SignCheckLibrary (3)
Verification\ArchiveVerifier.cs (3)
167string hashedPath = String.IsNullOrEmpty(directoryName) ? Utils.GetHash(@".\", HashAlgorithmName.SHA256.Name) : 168Utils.GetHash(directoryName, HashAlgorithmName.SHA256.Name); 173Utils.GetHash(archiveEntry.RelativePath, HashAlgorithmName.SHA256.Name) + Path.GetExtension(archiveEntry.RelativePath); // lgtm [cs/zipslip] Archive from trusted source
Microsoft.DotNet.SignTool.Tests (1)
StrongNameSupportHelper.cs (1)
17rsa.SignData(Array.Empty<byte>(), HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1);
Microsoft.DotNet.StrongName (3)
Signing.cs (1)
213signature = snkRSA.SignHash(hash, HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1);
Utils.cs (1)
143using (var hash = IncrementalHash.CreateHash(HashAlgorithmName.SHA1))
Verification.cs (1)
128if (!rsa.VerifyHash(hash, reversedSignature, HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1))
Microsoft.Extensions.FileProviders.Physical (1)
PollingWildCardChangeToken.cs (1)
120using (var sha256 = IncrementalHash.CreateHash(HashAlgorithmName.SHA256))
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
883[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HashAlgorithmName))]
netstandard (1)
netstandard.cs (1)
1880[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HashAlgorithmName))]
Roslyn.Test.PdbUtilities (1)
Reader\PdbValidation.cs (1)
563public static void ValidateDebugDirectory(Stream peStream, Stream portablePdbStreamOpt, string pdbPath, HashAlgorithmName hashAlgorithm, bool hasEmbeddedPdb, bool isDeterministic)
System.Security.Cryptography (173)
artifacts\obj\System.Security.Cryptography\Debug\net10.0\System.Security.Cryptography.notsupported.cs (173)
669public static byte[] HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 670public static byte[] HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.IO.Stream source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 671public static int HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.IO.Stream source, System.Span<byte> destination) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 672public static byte[] HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 673public static int HashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> source, System.Span<byte> destination) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 674public static System.Threading.Tasks.ValueTask<int> HashDataAsync(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.IO.Stream source, System.Memory<byte> destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 675public static System.Threading.Tasks.ValueTask<byte[]> HashDataAsync(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.IO.Stream source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 676public static byte[] HmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key, byte[] source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 677public static byte[] HmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key, System.IO.Stream source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 678public static byte[] HmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> key, System.IO.Stream source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 679public static int HmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> key, System.IO.Stream source, System.Span<byte> destination) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 680public static byte[] HmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> key, System.ReadOnlySpan<byte> source) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 681public static int HmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> key, System.ReadOnlySpan<byte> source, System.Span<byte> destination) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 682public static System.Threading.Tasks.ValueTask<byte[]> HmacDataAsync(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key, System.IO.Stream source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 683public static System.Threading.Tasks.ValueTask<int> HmacDataAsync(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlyMemory<byte> key, System.IO.Stream source, System.Memory<byte> destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 684public static System.Threading.Tasks.ValueTask<byte[]> HmacDataAsync(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlyMemory<byte> key, System.IO.Stream source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 685public static bool TryHashData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> source, System.Span<byte> destination, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 686public static bool TryHmacData(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> key, System.ReadOnlySpan<byte> source, System.Span<byte> destination, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 841protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 842protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 851public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 852public byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 853public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 854public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 855public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 856public byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 857protected virtual byte[] SignDataCore(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 858protected virtual byte[] SignDataCore(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 867protected virtual bool TryHashData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 868public virtual bool TrySignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 869public bool TrySignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 870protected virtual bool TrySignDataCore(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 871public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 872public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 873public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 874public bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 875public virtual bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 876public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 877public virtual bool VerifyData(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 878public bool VerifyData(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 879protected virtual bool VerifyDataCore(System.IO.Stream data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 880protected virtual bool VerifyDataCore(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 939protected override byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 940protected override byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1056public System.Security.Cryptography.HashAlgorithmName? Hash; 1115public byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1116public virtual byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1117public byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1118public virtual byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1147public override byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1148public override byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1262protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1263protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1264public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1265public byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1266public virtual byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1267public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1268public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1269public byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1270public byte[] SignData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1271public byte[] SignData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1272public int SignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1273public int SignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1274protected virtual byte[] SignDataCore(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1275protected virtual byte[] SignDataCore(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1284protected virtual bool TryHashData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1285public virtual bool TrySignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1286public bool TrySignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1287protected virtual bool TrySignDataCore(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1291public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1292public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1293public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1294public bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1295public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1296public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1297public virtual bool VerifyData(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1298public bool VerifyData(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1299protected virtual bool VerifyDataCore(System.IO.Stream data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1300protected virtual bool VerifyDataCore(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1456public readonly partial struct HashAlgorithmName : System.IEquatable<System.Security.Cryptography.HashAlgorithmName> 1461public static System.Security.Cryptography.HashAlgorithmName MD5 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1463public static System.Security.Cryptography.HashAlgorithmName SHA1 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1464public static System.Security.Cryptography.HashAlgorithmName SHA256 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1465public static System.Security.Cryptography.HashAlgorithmName SHA384 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1466public static System.Security.Cryptography.HashAlgorithmName SHA3_256 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1467public static System.Security.Cryptography.HashAlgorithmName SHA3_384 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1468public static System.Security.Cryptography.HashAlgorithmName SHA3_512 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1469public static System.Security.Cryptography.HashAlgorithmName SHA512 { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1471public bool Equals(System.Security.Cryptography.HashAlgorithmName other) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1472public static System.Security.Cryptography.HashAlgorithmName FromOid(string oidValue) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1474public static bool operator ==(System.Security.Cryptography.HashAlgorithmName left, System.Security.Cryptography.HashAlgorithmName right) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1475public static bool operator !=(System.Security.Cryptography.HashAlgorithmName left, System.Security.Cryptography.HashAlgorithmName right) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1477public static bool TryFromOid(string oidValue, out System.Security.Cryptography.HashAlgorithmName value) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1481public static byte[] DeriveKey(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] ikm, int outputLength, byte[]? salt = null, byte[]? info = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1482public static void DeriveKey(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan<byte> ikm, System.Span<byte> output, System.ReadOnlySpan<byte> salt, System.ReadOnlySpan<byte> info) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1483public static byte[] Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] prk, int outputLength, byte[]? info = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1484public static void Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan<byte> prk, System.Span<byte> output, System.ReadOnlySpan<byte> info) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1485public static byte[] Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] ikm, byte[]? salt = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1486public static int Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan<byte> ikm, System.ReadOnlySpan<byte> salt, System.Span<byte> prk) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1738public System.Security.Cryptography.HashAlgorithmName AlgorithmName { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 1744public static System.Security.Cryptography.IncrementalHash CreateHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1745public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 1746public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> key) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2240public PbeParameters(System.Security.Cryptography.PbeEncryptionAlgorithm encryptionAlgorithm, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2242public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 2331public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2337public Rfc2898DeriveBytes(string password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2343public Rfc2898DeriveBytes(string password, int saltSize, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2344public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 2351public static byte[] Pbkdf2(byte[] password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2352public static byte[] Pbkdf2(System.ReadOnlySpan<byte> password, System.ReadOnlySpan<byte> salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2353public static void Pbkdf2(System.ReadOnlySpan<byte> password, System.ReadOnlySpan<byte> salt, System.Span<byte> destination, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2354public static byte[] Pbkdf2(System.ReadOnlySpan<char> password, System.ReadOnlySpan<byte> salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2355public static void Pbkdf2(System.ReadOnlySpan<char> password, System.ReadOnlySpan<byte> salt, System.Span<byte> destination, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2356public static byte[] Pbkdf2(string password, byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int outputLength) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2440protected virtual byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2441protected virtual byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2452public virtual byte[] SignData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2453public byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2454public virtual byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2455public byte[] SignData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2456public int SignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2457public virtual byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2458public byte[] SignHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2459public int SignHash(System.ReadOnlySpan<byte> hash, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2471protected virtual bool TryHashData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2472public virtual bool TrySignData(System.ReadOnlySpan<byte> data, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2473public virtual bool TrySignHash(System.ReadOnlySpan<byte> hash, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2474public bool VerifyData(byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2475public virtual bool VerifyData(byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2476public bool VerifyData(System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2477public virtual bool VerifyData(System.ReadOnlySpan<byte> data, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2478public virtual bool VerifyHash(byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2479public virtual bool VerifyHash(System.ReadOnlySpan<byte> hash, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2501public override byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2507public override bool TrySignHash(System.ReadOnlySpan<byte> hash, System.Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2508public override bool VerifyHash(byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2509public override bool VerifyHash(System.ReadOnlySpan<byte> hash, System.ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2550public override byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2553public override bool VerifyHash(byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 2560public System.Security.Cryptography.HashAlgorithmName OaepHashAlgorithm { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 2569public static System.Security.Cryptography.RSAEncryptionPadding CreateOaep(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3131public SP800108HmacCounterKdf(byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3132public SP800108HmacCounterKdf(System.ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3133public static byte[] DeriveBytes(byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] label, byte[] context, int derivedKeyLengthInBytes) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3134public static byte[] DeriveBytes(byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, string label, string context, int derivedKeyLengthInBytes) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3135public static byte[] DeriveBytes(System.ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> label, System.ReadOnlySpan<byte> context, int derivedKeyLengthInBytes) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3136public static void DeriveBytes(System.ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> label, System.ReadOnlySpan<byte> context, System.Span<byte> destination) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3137public static byte[] DeriveBytes(System.ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<char> label, System.ReadOnlySpan<char> context, int derivedKeyLengthInBytes) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3138public static void DeriveBytes(System.ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<char> label, System.ReadOnlySpan<char> context, System.Span<byte> destination) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3300public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3303public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3306public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3307public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding? rsaSignaturePadding = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3308public CertificateRequest(string subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3311public CertificateRequest(string subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3315public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } } 3328public static System.Security.Cryptography.X509Certificates.CertificateRequest LoadSigningRequest(byte[] pkcs10, System.Security.Cryptography.HashAlgorithmName signerHashAlgorithm, System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions options = System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions.Default, System.Security.Cryptography.RSASignaturePadding? signerSignaturePadding = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3329public static System.Security.Cryptography.X509Certificates.CertificateRequest LoadSigningRequest(System.ReadOnlySpan<byte> pkcs10, System.Security.Cryptography.HashAlgorithmName signerHashAlgorithm, out int bytesConsumed, System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions options = System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions.Default, System.Security.Cryptography.RSASignaturePadding? signerSignaturePadding = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3330public static System.Security.Cryptography.X509Certificates.CertificateRequest LoadSigningRequestPem(System.ReadOnlySpan<char> pkcs10Pem, System.Security.Cryptography.HashAlgorithmName signerHashAlgorithm, System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions options = System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions.Default, System.Security.Cryptography.RSASignaturePadding? signerSignaturePadding = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3331public static System.Security.Cryptography.X509Certificates.CertificateRequest LoadSigningRequestPem(string pkcs10Pem, System.Security.Cryptography.HashAlgorithmName signerHashAlgorithm, System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions options = System.Security.Cryptography.X509Certificates.CertificateRequestLoadOptions.Default, System.Security.Cryptography.RSASignaturePadding? signerSignaturePadding = null) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3346public byte[] Build(System.Security.Cryptography.X509Certificates.X500DistinguishedName issuerName, System.Security.Cryptography.X509Certificates.X509SignatureGenerator generator, System.Numerics.BigInteger crlNumber, System.DateTimeOffset nextUpdate, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension authorityKeyIdentifier, System.DateTimeOffset? thisUpdate = default(System.DateTimeOffset?)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3347public byte[] Build(System.Security.Cryptography.X509Certificates.X509Certificate2 issuerCertificate, System.Numerics.BigInteger crlNumber, System.DateTimeOffset nextUpdate, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding? rsaSignaturePadding = null, System.DateTimeOffset? thisUpdate = default(System.DateTimeOffset?)) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3640public virtual byte[] GetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3642public virtual string GetCertHashString(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3679public virtual bool TryGetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Span<byte> destination, out int bytesWritten) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3833public System.Security.Cryptography.X509Certificates.X509Certificate2Collection FindByThumbprint(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<byte> thumbprintBytes) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3834public System.Security.Cryptography.X509Certificates.X509Certificate2Collection FindByThumbprint(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan<char> thumbprintHex) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 3835public System.Security.Cryptography.X509Certificates.X509Certificate2Collection FindByThumbprint(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, string thumbprintHex) { throw new System.PlatformNotSupportedException(System.SR.SystemSecurityCryptography_PlatformNotSupported); } 4185public abstract byte[] GetSignatureAlgorithmIdentifier(System.Security.Cryptography.HashAlgorithmName hashAlgorithm); 4186public abstract byte[] SignData(byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
System.Security.Cryptography.Cose (29)
System\Security\Cryptography\Cose\CoseKey.cs (24)
17internal HashAlgorithmName? HashAlgorithm { get; } 30public CoseKey(RSA key, RSASignaturePadding signaturePadding, HashAlgorithmName hashAlgorithm) 45public CoseKey(ECDsa key, HashAlgorithmName hashAlgorithm) 75CoseAlgorithm.ES256 => new CoseKey(ecdsaKey, HashAlgorithmName.SHA256), 76CoseAlgorithm.ES384 => new CoseKey(ecdsaKey, HashAlgorithmName.SHA384), 77CoseAlgorithm.ES512 => new CoseKey(ecdsaKey, HashAlgorithmName.SHA512), 85CoseAlgorithm.RS256 => new CoseKey(rsaKey, RSASignaturePadding.Pkcs1, HashAlgorithmName.SHA256), 86CoseAlgorithm.RS384 => new CoseKey(rsaKey, RSASignaturePadding.Pkcs1, HashAlgorithmName.SHA384), 87CoseAlgorithm.RS512 => new CoseKey(rsaKey, RSASignaturePadding.Pkcs1, HashAlgorithmName.SHA512), 88CoseAlgorithm.PS256 => new CoseKey(rsaKey, RSASignaturePadding.Pss, HashAlgorithmName.SHA256), 89CoseAlgorithm.PS384 => new CoseKey(rsaKey, RSASignaturePadding.Pss, HashAlgorithmName.SHA384), 90CoseAlgorithm.PS512 => new CoseKey(rsaKey, RSASignaturePadding.Pss, HashAlgorithmName.SHA512), 226private static int SignHashWithRSA(RSA key, ReadOnlySpan<byte> hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, Span<byte> destination) 268private static CoseAlgorithm GetRSAAlgorithm(RSASignaturePadding signaturePadding, HashAlgorithmName hashAlgorithm) 276nameof(HashAlgorithmName.SHA256) => CoseAlgorithm.PS256, 277nameof(HashAlgorithmName.SHA384) => CoseAlgorithm.PS384, 278nameof(HashAlgorithmName.SHA512) => CoseAlgorithm.PS512, 287nameof(HashAlgorithmName.SHA256) => CoseAlgorithm.RS256, 288nameof(HashAlgorithmName.SHA384) => CoseAlgorithm.RS384, 289nameof(HashAlgorithmName.SHA512) => CoseAlgorithm.RS512, 294private static CoseAlgorithm GetECDsaAlgorithm(HashAlgorithmName hashAlgorithm) 298nameof(HashAlgorithmName.SHA256) => CoseAlgorithm.ES256, 299nameof(HashAlgorithmName.SHA384) => CoseAlgorithm.ES384, 300nameof(HashAlgorithmName.SHA512) => CoseAlgorithm.ES512,
System\Security\Cryptography\Cose\CoseSigner.cs (4)
34public HashAlgorithmName HashAlgorithm => CoseKey.HashAlgorithm ?? default; 52/// <paramref name="key"/> is <see cref="RSA"/>, use <see cref="CoseSigner(RSA, RSASignaturePadding, HashAlgorithmName, CoseHeaderMap?, CoseHeaderMap?)"/> to specify a signature padding. 71public CoseSigner(AsymmetricAlgorithm key, HashAlgorithmName hashAlgorithm, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null) 110public CoseSigner(RSA key, RSASignaturePadding signaturePadding, HashAlgorithmName hashAlgorithm, CoseHeaderMap? protectedHeaders = null, CoseHeaderMap? unprotectedHeaders = null)
System\Security\Cryptography\Cose\HashToBeSignedBuilder.cs (1)
16internal HashToBeSignedBuilder(HashAlgorithmName hashAlgorithmName)
System.Security.Cryptography.Pkcs (109)
Internal\Cryptography\PkcsHelpers.cs (10)
30internal static HashAlgorithmName GetDigestAlgorithm(Oid oid) 36internal static HashAlgorithmName GetDigestAlgorithm(string? oidValue, bool forVerification = false) 42return HashAlgorithmName.MD5; 45return HashAlgorithmName.SHA1; 48return HashAlgorithmName.SHA256; 51return HashAlgorithmName.SHA384; 54return HashAlgorithmName.SHA512; 58return HashAlgorithmName.SHA3_256; 61return HashAlgorithmName.SHA3_384; 64return HashAlgorithmName.SHA3_512;
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (9)
214internal static string GetOidFromHashAlgorithm(HashAlgorithmName algName) 216if (algName == HashAlgorithmName.MD5) 218if (algName == HashAlgorithmName.SHA1) 220if (algName == HashAlgorithmName.SHA256) 222if (algName == HashAlgorithmName.SHA384) 224if (algName == HashAlgorithmName.SHA512) 227if (algName == HashAlgorithmName.SHA3_256) 229if (algName == HashAlgorithmName.SHA3_384) 231if (algName == HashAlgorithmName.SHA3_512)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (6)
21HashAlgorithmName hashAlgorithm; 30hashAlgorithm = HashAlgorithmName.MD5; 34hashAlgorithm = HashAlgorithmName.SHA1; 38hashAlgorithm = HashAlgorithmName.SHA256; 42hashAlgorithm = HashAlgorithmName.SHA384; 46hashAlgorithm = HashAlgorithmName.SHA512;
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
191internal static IncrementalHash CreateIncrementalHash(HashAlgorithmName hashAlgorithmName)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (25)
44if (pbeParameters.HashAlgorithm != HashAlgorithmName.SHA1) 88HashAlgorithmName digestAlgorithmName; 96digestAlgorithmName = HashAlgorithmName.MD5; 100digestAlgorithmName = HashAlgorithmName.MD5; 104digestAlgorithmName = HashAlgorithmName.SHA1; 108digestAlgorithmName = HashAlgorithmName.SHA1; 112digestAlgorithmName = HashAlgorithmName.SHA1; 117digestAlgorithmName = HashAlgorithmName.SHA1; 123digestAlgorithmName = HashAlgorithmName.SHA1; 129digestAlgorithmName = HashAlgorithmName.SHA1; 280HashAlgorithmName prf = pbeParameters.HashAlgorithm; 282if (prf == HashAlgorithmName.SHA256) 286else if (prf == HashAlgorithmName.SHA384) 290else if (prf == HashAlgorithmName.SHA512) 294else if (prf == HashAlgorithmName.SHA1) 328HashAlgorithmName prf = pbeParameters.HashAlgorithm; 354Debug.Assert(pbeParameters.HashAlgorithm == HashAlgorithmName.SHA1); 748HashAlgorithmName prf = pbkdf2Params.Prf.Algorithm switch 750Oids.HmacWithSha1 => HashAlgorithmName.SHA1, 751Oids.HmacWithSha256 => HashAlgorithmName.SHA256, 752Oids.HmacWithSha384 => HashAlgorithmName.SHA384, 753Oids.HmacWithSha512 => HashAlgorithmName.SHA512, 858HashAlgorithmName hashAlgorithm, 1116HashAlgorithmName prf, 1133HashAlgorithmName prf)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (2)
138HashAlgorithmName hashAlgorithm, 150HashAlgorithmName hashAlgorithm,
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (11)
20private static readonly (HashAlgorithmName, int, int)[] s_uvLookup = new[] 22(HashAlgorithmName.MD5, 128, 512), 23(HashAlgorithmName.SHA1, 160, 512), 24(HashAlgorithmName.SHA256, 256, 512), 25(HashAlgorithmName.SHA384, 384, 1024), 26(HashAlgorithmName.SHA512, 512, 1024), 31HashAlgorithmName hashAlgorithm, 47HashAlgorithmName hashAlgorithm, 63HashAlgorithmName hashAlgorithm, 79HashAlgorithmName hashAlgorithm, 89foreach ((HashAlgorithmName, int, int) huv in s_uvLookup)
System\Security\Cryptography\Pkcs\CmsSignature.DSA.cs (7)
18lookup.Add(Oids.DsaWithSha1, new DSACmsSignature(Oids.DsaWithSha1, HashAlgorithmName.SHA1)); 19lookup.Add(Oids.DsaWithSha256, new DSACmsSignature(Oids.DsaWithSha256, HashAlgorithmName.SHA256)); 20lookup.Add(Oids.DsaWithSha384, new DSACmsSignature(Oids.DsaWithSha384, HashAlgorithmName.SHA384)); 21lookup.Add(Oids.DsaWithSha512, new DSACmsSignature(Oids.DsaWithSha512, HashAlgorithmName.SHA512)); 28private readonly HashAlgorithmName _expectedDigest; 33internal DSACmsSignature(string? signatureAlgorithm, HashAlgorithmName expectedDigest) 54HashAlgorithmName digestAlgorithmName = PkcsHelpers.GetDigestAlgorithm(digestAlgorithmOid, forVerification: true);
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (10)
16lookup.Add(Oids.ECDsaWithSha1, new ECDsaCmsSignature(Oids.ECDsaWithSha1, HashAlgorithmName.SHA1)); 17lookup.Add(Oids.ECDsaWithSha256, new ECDsaCmsSignature(Oids.ECDsaWithSha256, HashAlgorithmName.SHA256)); 18lookup.Add(Oids.ECDsaWithSha384, new ECDsaCmsSignature(Oids.ECDsaWithSha384, HashAlgorithmName.SHA384)); 19lookup.Add(Oids.ECDsaWithSha512, new ECDsaCmsSignature(Oids.ECDsaWithSha512, HashAlgorithmName.SHA512)); 21lookup.Add(Oids.ECDsaWithSha3_256, new ECDsaCmsSignature(Oids.ECDsaWithSha3_256, HashAlgorithmName.SHA3_256)); 22lookup.Add(Oids.ECDsaWithSha3_384, new ECDsaCmsSignature(Oids.ECDsaWithSha3_384, HashAlgorithmName.SHA3_384)); 23lookup.Add(Oids.ECDsaWithSha3_512, new ECDsaCmsSignature(Oids.ECDsaWithSha3_512, HashAlgorithmName.SHA3_512)); 30private readonly HashAlgorithmName? _expectedDigest; 35internal ECDsaCmsSignature(string? signatureAlgorithm, HashAlgorithmName? expectedDigest) 56HashAlgorithmName digestAlgorithmName = PkcsHelpers.GetDigestAlgorithm(digestAlgorithmOid, forVerification: true);
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (21)
19lookup.Add(Oids.RsaPkcs1Sha1, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha1, HashAlgorithmName.SHA1)); 20lookup.Add(Oids.RsaPkcs1Sha256, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha256, HashAlgorithmName.SHA256)); 21lookup.Add(Oids.RsaPkcs1Sha384, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha384, HashAlgorithmName.SHA384)); 22lookup.Add(Oids.RsaPkcs1Sha512, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha512, HashAlgorithmName.SHA512)); 24lookup.Add(Oids.RsaPkcs1Sha3_256, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha3_256, HashAlgorithmName.SHA3_256)); 25lookup.Add(Oids.RsaPkcs1Sha3_384, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha3_384, HashAlgorithmName.SHA3_384)); 26lookup.Add(Oids.RsaPkcs1Sha3_512, new RSAPkcs1CmsSignature(Oids.RsaPkcs1Sha3_512, HashAlgorithmName.SHA3_512)); 34private readonly HashAlgorithmName? _expectedDigest; 36protected RSACmsSignature(string? signatureAlgorithm, HashAlgorithmName? expectedDigest) 57HashAlgorithmName digestAlgorithmName = PkcsHelpers.GetDigestAlgorithm(digestAlgorithmOid, forVerification: true); 98HashAlgorithmName digestAlgorithmName, 107HashAlgorithmName hashAlgorithmName, 183public RSAPkcs1CmsSignature(string? signatureAlgorithm, HashAlgorithmName? expectedDigest) 191HashAlgorithmName digestAlgorithmName, 306HashAlgorithmName digestAlgorithmName, 343HashAlgorithmName hashAlgorithmName = PkcsHelpers.GetDigestAlgorithm(hashAlgorithmOid); 358if (hashAlgorithmName == HashAlgorithmName.SHA1) 362else if (hashAlgorithmName == HashAlgorithmName.SHA256) 366else if (hashAlgorithmName == HashAlgorithmName.SHA384) 370else if (hashAlgorithmName == HashAlgorithmName.SHA512) 378Debug.Assert(hashAlgorithmName == HashAlgorithmName.MD5, $"Unsupported digest algorithm '{hashAlgorithmName.Name}'");
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (3)
166HashAlgorithmName hashAlgorithm, 190HashAlgorithmName hashAlgorithm, 213HashAlgorithmName hashAlgorithm,
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (4)
99HashAlgorithmName hashAlgorithm, 174HashAlgorithmName hashAlgorithmName = PkcsHelpers.GetDigestAlgorithm(hashAlgorithmId); 488if (!signerCert.TryGetCertHash(HashAlgorithmName.SHA1, thumbprint, out int written) || 512HashAlgorithmName alg;
System.Security.Cryptography.Primitives (1)
System.Security.Cryptography.Primitives.cs (1)
15[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.HashAlgorithmName))]
Templates.Blazor.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Templates.Mvc.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
Templates.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
582keyBytes = key.ExportEncryptedPkcs8PrivateKey(password, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 100000)); 591keyBytes = key.ExportEncryptedPkcs8PrivateKey(string.Empty, new PbeParameters(PbeEncryptionAlgorithm.Aes256Cbc, HashAlgorithmName.SHA256, 1)); 825var request = new CertificateRequest(subject, key, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
WebTransportInteractiveSampleApp (1)
Program.cs (1)
183CertificateRequest req = new("CN=localhost", ec, HashAlgorithmName.SHA256);
WebTransportSampleApp (1)
Program.cs (1)
69CertificateRequest req = new("CN=localhost", ec, HashAlgorithmName.SHA256);