75 references to Helpers
System.Security.Cryptography (75)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
210return Helpers.DecodeOctetStringAsMemory(encodedOctetString);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (1)
48saltSize = Helpers.HashOidToByteLength(HashAlgorithm.Algorithm);
src\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (1)
270return Helpers.TryCopyToDestination(derSignature, destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (1)
147return Helpers.TryCopyToDestination(tmpDerSignature, destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (1)
208Helpers.RngFill(salt);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
754throw Helpers.CreateAlgorithmUnknownException(spki.Algorithm.Algorithm); 761throw Helpers.CreateAlgorithmUnknownException(writer); 809throw Helpers.CreateAlgorithmUnknownException(pki.PrivateKeyAlgorithm.Algorithm); 816throw Helpers.CreateAlgorithmUnknownException(writer);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (1)
1680throw Helpers.CreateAlgorithmUnknownException(writer);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (4)
77if (!Helpers.HasSymmetricEncryption) 240if (!Helpers.HasSymmetricEncryption) 571if (!Helpers.HasSymmetricEncryption) 1104if (!Helpers.IsRC2Supported)
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (1)
1730throw Helpers.CreateAlgorithmUnknownException(writer);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (3)
151Helpers.DecodeOctetStringAsMemory(pfxAsn.AuthSafe.Content); 205contentData = Helpers.DecodeOctetStringAsMemory(safeContentsAsn.Content); 926Helpers.RngFill(salt);
System\Security\Cryptography\CryptographicOperations.cs (1)
806case HashAlgorithmNames.MD5 when Helpers.HasMD5:
System\Security\Cryptography\DSA.cs (2)
516return Helpers.TryCopyToDestination(sig, destination, out bytesWritten); 534return Helpers.TryCopyToDestination(hash, destination, out bytesWritten);
System\Security\Cryptography\ECDsa.cs (1)
1106return Helpers.TryCopyToDestination(converted, destination, out bytesWritten);
System\Security\Cryptography\HKDF.cs (6)
35int hashLength = Helpers.HashLength(hashAlgorithmName); 53int hashLength = Helpers.HashLength(hashAlgorithmName); 88int hashLength = Helpers.HashLength(hashAlgorithmName); 120int hashLength = Helpers.HashLength(hashAlgorithmName); 153int hashLength = Helpers.HashLength(hashAlgorithmName); 177int hashLength = Helpers.HashLength(hashAlgorithmName);
System\Security\Cryptography\HKDFManagedImplementation.cs (2)
14Debug.Assert(Helpers.HashLength(hashAlgorithmName) == hashLength); 21Debug.Assert(Helpers.HashLength(hashAlgorithmName) == hashLength);
System\Security\Cryptography\HMACCommon.cs (2)
50ActualKey = Helpers.CloneByteArray(actualKey); 97case HashAlgorithmNames.MD5 when Helpers.HasMD5:
System\Security\Cryptography\Kmac128.cs (2)
39: this(Helpers.ArrayToSpanOrThrow(key), customizationString) 80public void AppendData(byte[] data) => AppendData(Helpers.ArrayToSpanOrThrow(data));
System\Security\Cryptography\Kmac256.cs (2)
39: this(Helpers.ArrayToSpanOrThrow(key), customizationString) 80public void AppendData(byte[] data) => AppendData(Helpers.ArrayToSpanOrThrow(data));
System\Security\Cryptography\KmacXof128.cs (2)
39: this(Helpers.ArrayToSpanOrThrow(key), customizationString) 80public void AppendData(byte[] data) => AppendData(Helpers.ArrayToSpanOrThrow(data));
System\Security\Cryptography\KmacXof256.cs (2)
39: this(Helpers.ArrayToSpanOrThrow(key), customizationString) 80public void AppendData(byte[] data) => AppendData(Helpers.ArrayToSpanOrThrow(data));
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (4)
462Helpers.HashAlgorithmRequired(signatureGenerator.PublicKey.Oid.Value)) 496Helpers.ValidateDer(attr.RawData); 974Helpers.HashAlgorithmRequired(generator.PublicKey.Oid.Value)) 986Helpers.ValidateDer(signatureAlgorithmAsn.Parameters.Value.Span);
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (2)
353case string oid when Helpers.IsSlhDsaOid(oid): 399case string oid when Helpers.IsSlhDsaOid(oid):
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (5)
144if (Helpers.HashAlgorithmRequired(issuerCertificate.GetKeyAlgorithm())) 208case string when Helpers.IsSlhDsaOid(keyAlgorithm): 342if (Helpers.HashAlgorithmRequired(generator.PublicKey.Oid.Value)) 358Helpers.ValidateDer(signatureAlgorithmAsn.Parameters.GetValueOrDefault().Span); 423Helpers.ValidateDer(encodedAkid);
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
43if (!Helpers.AreSamePublicECParameters(publicKey.ExportParameters(false), privateKey.ExportParameters(false)))
System\Security\Cryptography\X509Certificates\Pkcs10CertificationRequestInfo.cs (1)
51Helpers.ValidateDer(signatureAlgorithmAsn.Parameters.Value.Span);
System\Security\Cryptography\X509Certificates\PublicKey.cs (1)
376Helpers.IsSlhDsaOid(_oid.Value)
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (2)
53return ExportPkcs12(Helpers.Windows3desPbe, password); 66PbeParameters pbeParameters = Helpers.MapExportParametersToPbeParameters(exportParameters);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (4)
369Helpers.ThrowIfInvalidPkcs12ExportParameters(exportParameters); 370Helpers.ThrowIfPasswordContainsNullCharacter(password); 411Helpers.ThrowIfInvalidPkcs12ExportParameters(exportParameters); 412Helpers.ThrowIfPasswordContainsNullCharacter(password);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (7)
772if (!Helpers.AreSamePublicECParameters(publicKey.ExportParameters(false), privateKey.ExportParameters(false))) 1000if (!Helpers.IsSlhDsaOid(GetKeyAlgorithm())) 1020Helpers.IsSlhDsaOid(GetKeyAlgorithm()) 1262Oids.Dsa when Helpers.IsDSASupported => ExtractKeyFromPem<DSA>( 1285_ when Helpers.IsSlhDsaOid(keyAlgorithm) => 1354Oids.Dsa when Helpers.IsDSASupported => 1378_ when Helpers.IsSlhDsaOid(keyAlgorithm) =>
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (4)
133Helpers.ThrowIfInvalidPkcs12ExportParameters(exportParameters); 134Helpers.ThrowIfPasswordContainsNullCharacter(password); 171Helpers.ThrowIfInvalidPkcs12ExportParameters(exportParameters); 172Helpers.ThrowIfPasswordContainsNullCharacter(password);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.OpenSsl.cs (1)
75case string when Helpers.IsSlhDsaOid(algorithm):
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (3)
233ReadOnlyMemory<byte> certData = Helpers.DecodeOctetStringAsMemory(certBag.CertValue); 323Helpers.DecodeOctetStringAsMemory(attr.AttrValues[0]).Span); 419Helpers.DecodeOctetStringAsMemory(attr.AttrValues[0]);