67 references to Helpers
System.Security.Cryptography (67)
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)
1678throw 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 (2)
735throw Helpers.CreateAlgorithmUnknownException(writer); 785throw 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)
406Helpers.HashAlgorithmRequired(signatureGenerator.PublicKey.Oid.Value)) 440Helpers.ValidateDer(attr.RawData); 927Helpers.HashAlgorithmRequired(generator.PublicKey.Oid.Value)) 939Helpers.ValidateDer(signatureAlgorithmAsn.Parameters.Value.Span);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (4)
144if (Helpers.HashAlgorithmRequired(issuerCertificate.GetKeyAlgorithm())) 337if (Helpers.HashAlgorithmRequired(generator.PublicKey.Oid.Value)) 353Helpers.ValidateDer(signatureAlgorithmAsn.Parameters.GetValueOrDefault().Span); 418Helpers.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\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 (3)
772if (!Helpers.AreSamePublicECParameters(publicKey.ExportParameters(false), privateKey.ExportParameters(false))) 1170Oids.Dsa when Helpers.IsDSASupported => ExtractKeyFromPem<DSA>( 1256Oids.Dsa when Helpers.IsDSASupported =>
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (4)
133Helpers.ThrowIfInvalidPkcs12ExportParameters(exportParameters); 134Helpers.ThrowIfPasswordContainsNullCharacter(password); 171Helpers.ThrowIfInvalidPkcs12ExportParameters(exportParameters); 172Helpers.ThrowIfPasswordContainsNullCharacter(password);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (3)
233ReadOnlyMemory<byte> certData = Helpers.DecodeOctetStringAsMemory(certBag.CertValue); 325Helpers.DecodeOctetStringAsMemory(attr.AttrValues[0]).Span); 422Helpers.DecodeOctetStringAsMemory(attr.AttrValues[0]);