1469 references to SR
System.Security.Cryptography (1469)
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (1)
83throw new ArgumentException(SR.Argument_Invalid_SafeHandleInvalidOrClosed, nameof(parentHandle));
src\runtime\src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (10)
70throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 98throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 120throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 127throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 135throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 235throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, algName.Name); 326throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 333throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 404throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\AesBCryptModes.cs (1)
50throw new CryptographicException(SR.Cryptography_FeedbackSizeNotSupported, ex);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\TripleDesBCryptModes.cs (1)
53throw new CryptographicException(SR.Cryptography_FeedbackSizeNotSupported, ex);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AesAEAD.cs (1)
12throw new CryptographicException(SR.Cryptography_InvalidKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (8)
86throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tagSizeInBytes)); 305throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 308throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 317throw new ArgumentException(SR.Format(SR.Cryptography_IncorrectTagLength, tagSizeInBytes), nameof(tag)); 322throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag)); 330throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(AesGcm)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (8)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 43throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 84throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 141throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 153throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 176throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 193throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (9)
33throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 45throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 70throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 87throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 144throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 153throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 174throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 191throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 204throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\CurveAsn.xml.cs (2)
65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 82throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\DigestInfoAsn.xml.cs (4)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 129throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 146throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (3)
99throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 140throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 152throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\DssParms.xml.cs (2)
49throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 66throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (3)
86throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 108throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 120throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\ECPrivateKey.xml.cs (2)
87throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 104throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\EdiPartyNameAsn.xml.cs (2)
57throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 74throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\EncryptedPrivateKeyInfoAsn.xml.cs (4)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 129throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 146throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\FieldID.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (5)
116throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 133throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 177throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 200throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 212throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyAsn.xml.cs (2)
134throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 146throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyBothAsn.xml.cs (2)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (2)
134throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 146throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyBothAsn.xml.cs (2)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PBEParameter.xml.cs (2)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PBES2Params.xml.cs (2)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2Params.xml.cs (2)
84throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 101throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (2)
112throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 124throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (4)
84throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 101throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 201throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 218throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (3)
50SR.Format(SR.Cryptography_UnknownHashAlgorithm, algorithmValue)); 55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.xml.cs (4)
55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 72throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 156throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 173throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (4)
34throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 43throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 96throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (6)
81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 106throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 131throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 156throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 188throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 200throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (8)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 127throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 137throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 159throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 176throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 44throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 69throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 86throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (3)
33throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedDataAsn.xml.cs (2)
63throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 80throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (3)
41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 40throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (3)
67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 102throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 119throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (2)
91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 103throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (3)
53throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 92throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 109throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PrivateKeyInfoAsn.xml.cs (5)
65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 82throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 179throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 202throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 219throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (7)
15throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 21SR.Cryptography_Pkcs_PssParametersMgfNotSupported, 27throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 38SR.Format( 39SR.Cryptography_Pkcs_PssParametersMgfHashMismatch, 54SR.Format( 55SR.Cryptography_Pkcs_PssParametersSaltMismatch,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.xml.cs (2)
150throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 167throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.xml.cs (4)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 134throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 151throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPrivateKeyAsn.xml.cs (2)
61throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 78throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPublicKeyAsn.xml.cs (2)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 64throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\SpecifiedECDomain.xml.cs (3)
62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 85throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 102throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.xml.cs (4)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 129throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 146throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (6)
50throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 86throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 103throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 165throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 200throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 217throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AsnWriter\AsnWriterExtensions.cs (2)
20throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 34throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (1)
81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AuthenticationTagMismatchException.cs (3)
16public AuthenticationTagMismatchException() : base(SR.Cryptography_AuthTagMismatch) 27public AuthenticationTagMismatchException(string? message) : base(message ?? SR.Cryptography_AuthTagMismatch) 43: base(message ?? SR.Cryptography_AuthTagMismatch, inner)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngPkcs8.cs (9)
112throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 135throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 180throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 189throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 199throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 235throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 247throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 257throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 267throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (21)
141SR.Argument_SignatureContextTooLong255); 213SR.Argument_SignatureContextTooLong255); 218throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 328SR.Argument_SignatureContextTooLong255); 679throw new CryptographicException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa))); 684throw new CryptographicException(SR.Argument_PublicKeyWrongSizeForAlgorithm); 877throw new CryptographicException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa))); 882throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 933throw new CryptographicException(SR.Argument_PublicKeyWrongSizeForAlgorithm); 983throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 1552throw new CryptographicException(SR.Argument_DestinationTooShort); 1557throw new CryptographicException(SR.Argument_DestinationTooShort); 1677throw new CryptographicException(SR.Argument_DestinationTooShort); 1682throw new CryptographicException(SR.Argument_DestinationTooShort); 1821throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 1982throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa))); 1990throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaCng.Windows.cs (1)
27throw new ArgumentException(SR.Cryptography_ArgCompositeMLDsaRequiresCompositeMLDsaKey, nameof(key));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaImplementation.Windows.cs (3)
44throw new CryptographicException(SR.Cryptography_NoPrivateKeyAvailable); 127throw new CryptographicException(SR.Cryptography_NoPrivateKeyAvailable); 140throw new CryptographicException(SR.Cryptography_NoPrivateKeyAvailable);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKem.cs (24)
173SR.Format(SR.Argument_DestinationImprecise, Algorithm.CiphertextSizeInBytes), 180SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 186throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 240throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 277throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 283SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 377throw new CryptographicException(SR.Argument_PublicKeyWrongSizeForAlgorithm); 455throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 547throw new CryptographicException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLKem))); 552throw new CryptographicException(SR.Argument_PublicKeyWrongSizeForAlgorithm); 646throw new CryptographicException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLKem))); 651throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 1821throw new CryptographicException(SR.Argument_DestinationTooShort); 1826throw new CryptographicException(SR.Argument_DestinationTooShort); 1964throw new CryptographicException(SR.Argument_DestinationTooShort); 1969throw new CryptographicException(SR.Argument_DestinationTooShort); 2092throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 2253throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLKem)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (3)
40throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(values)); 45throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.Value, asn.Oid.Value));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (7)
54throw new InvalidOperationException(SR.InvalidOperation_DuplicateItemNotAllowed); 63throw new CryptographicException(SR.Cryptography_Pkcs9_MultipleSigningTimeNotAllowed); 138throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 140throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 142throw new ArgumentException(SR.Argument_InvalidOffLen); 156throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 158throw new ArgumentException(SR.Argument_InvalidOffLen);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSACng.ImportExport.cs (9)
26throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MissingFields); 31throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPJ); 39throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPGY); 42throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedQX); 197throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_SeedRestriction_ShortKey); 211throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_QRestriction_ShortKey); 271_ => throw new PlatformNotSupportedException(SR.Cryptography_InvalidDsaParameters_QRestriction_LargeKey), 432throw new CryptographicException(SR.Cryptography_NotValidPrivateKey); 437throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSACng.SignVerify.cs (2)
63SR.Cryptography_UnknownSignatureFormat, 99SR.Cryptography_UnknownSignatureFormat,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (8)
25throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 39throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 105throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 110throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 130throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.HashAlgorithm.cs (3)
30throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, name.Value.Name); 82throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, algorithm));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.ImportExport.cs (2)
298throw new CryptographicException(SR.Cryptography_NotValidPrivateKey); 305throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.ImportExport.NamedCurve.cs (2)
187throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curveName), e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanCng.ImportExport.cs (5)
42SR.Format(SR.Cryptography_InvalidCurveOid, curve.Oid.Value)); 63SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString())); 122throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDsaCng.ImportExport.cs (5)
56throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_InvalidCurveOid, curve.Oid.Value!.ToString())); 75throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString())); 162throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDsaCng.SignVerify.cs (1)
65SR.Cryptography_UnknownSignatureFormat,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (12)
138throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid)); 154throw new CryptographicException(SR.Cryptography_HashLengthMismatch); 170throw new CryptographicException(SR.Cryptography_HashLengthMismatch, ae); 213throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName), ex); 231SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, algorithmId)); 267throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, ace); 272throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 284throw new ArgumentException(SR.Format(SR.Argument_DestinationImprecise, expectedLength), paramName);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (1)
52throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (8)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 53throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 78throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 84throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 126throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 135throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 154throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 162throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (11)
143throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 173throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 180throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 325throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 350throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 375throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 398throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 417throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 430throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 453throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 466throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (24)
129SR.Argument_SignatureContextTooLong255); 210SR.Argument_SignatureContextTooLong255); 312SR.Argument_SignatureContextTooLong255); 322throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmOid)); 327throw new CryptographicException(SR.Format( 328SR.Cryptography_HashMLDsaAlgorithmMismatch, 335throw new CryptographicException(SR.Cryptography_HashLengthMismatch); 424SR.Argument_SignatureContextTooLong255); 440throw new CryptographicException(SR.Cryptography_HashLengthMismatch); 578throw new ArgumentException(SR.Argument_MLDsaMuInvalidLength, nameof(externalMu)); 1372throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1807throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1857throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source)); 1907throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 2188throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 2197throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 2209throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 2226throw new CryptographicException(SR.Cryptography_MLDsaPkcs8KeyMismatch); 2241throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 2249SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, identifier.Algorithm)); 2263throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLDsa)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (10)
47throw new ArgumentException(SR.Cryptography_ArgMLDsaRequiresMLDsaKey, nameof(key)); 61throw new CryptographicException(SR.Cryptography_ArgMLDsaRequiresMLDsaKey); 134throw new CryptographicException(SR.Argument_PrivateSeedWrongSizeForAlgorithm); 141throw new CryptographicException(SR.Cryptography_NotValidPrivateKey); 179throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 192throw new CryptographicException(SR.Argument_PrivateSeedWrongSizeForAlgorithm); 202throw new CryptographicException(SR.Cryptography_NotValidPrivateKey); 372throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 390throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 495throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.Windows.cs (4)
44throw new CryptographicException(SR.Cryptography_NoPrivateKeyAvailable); 67throw new CryptographicException(SR.Cryptography_NoPrivateKeyAvailable); 185throw new CryptographicException(SR.Cryptography_NoPrivateKeyAvailable); 198throw new CryptographicException(SR.Cryptography_PqcNoSeed);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
49throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (28)
114SR.Format(SR.Argument_DestinationImprecise, Algorithm.CiphertextSizeInBytes), 121SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 127throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 205throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 211SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 251throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 294SR.Format(SR.Argument_DestinationImprecise, Algorithm.PrivateSeedSizeInBytes), 355throw new ArgumentException(SR.Argument_KemInvalidSeedLength, nameof(source)); 414throw new ArgumentException(SR.Argument_KemInvalidDecapsulationKeyLength, nameof(source)); 471throw new ArgumentException(SR.Argument_KemInvalidEncapsulationKeyLength, nameof(source)); 525SR.Format(SR.Argument_DestinationImprecise, Algorithm.DecapsulationKeySizeInBytes), 579SR.Format(SR.Argument_DestinationImprecise, Algorithm.EncapsulationKeySizeInBytes), 1198throw new CryptographicException(SR.Argument_KemInvalidEncapsulationKeyLength); 1673throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLKem))); 1702throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1711throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1723throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1740throw new CryptographicException(SR.Cryptography_KemPkcs8KeyMismatch); 1755throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1829throw new CryptographicException(SR.Cryptography_PqcNoSeed); 1837throw new CryptographicException(SR.Cryptography_KemNoDecapsulationKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.Windows.cs (2)
34throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 44throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (7)
39throw new ArgumentException(SR.Cryptography_ArgMLKemRequiresMLKemKey, nameof(key)); 53throw new CryptographicException(SR.Cryptography_ArgMLKemRequiresMLKemKey); 138throw new CryptographicException(SR.Cryptography_KeyNotExtractable); 154throw new CryptographicException(SR.Cryptography_KeyNotExtractable); 176throw new CryptographicException(SR.Cryptography_KeyNotExtractable); 204throw new CryptographicException(SR.Cryptography_KeyNotExtractable); 229throw new CryptographicException(SR.Cryptography_KeyNotExtractable);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
49throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (42)
33return new CryptographicException(SR.Cryptography_AlgKdfRequiresChars, algId); 60SR.Cryptography_UnknownHashAlgorithm, 75SR.Cryptography_UnknownAlgorithmIdentifier, 108SR.Format( 109SR.Cryptography_UnknownAlgorithmIdentifier, 171SR.Format( 172SR.Cryptography_UnknownAlgorithmIdentifier, 271SR.Format( 272SR.Cryptography_UnknownAlgorithmIdentifier, 303SR.Format( 304SR.Cryptography_UnknownAlgorithmIdentifier, 329throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.Name); 545throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 553SR.Format( 554SR.Cryptography_UnknownAlgorithmIdentifier, 605SR.Format(SR.Cryptography_AlgorithmNotSupported, algId)); 633throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 656throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 674throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 681throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 692throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 711throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 723throw new CryptographicException(SR.Cryptography_UnknownAlgorithmIdentifier, algId); 733throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 749throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 756throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 768throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 778SR.Format( 779SR.Cryptography_UnknownAlgorithmIdentifier, 786throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 796SR.Format( 797SR.Cryptography_UnknownAlgorithmIdentifier, 806throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 834throw new CryptographicException(SR.Argument_InvalidValue, e); 857throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 864throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 869throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 908throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1137throw new CryptographicException(SR.Argument_InvalidValue); 1148throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RC2)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PemKeyHelpers.Factory.cs (6)
33throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 44throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 59throw new ArgumentException(SR.Argument_PemImport_EncryptedPem, nameof(source)); 65throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(source)); 116throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 130throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(source));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (9)
49throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); 51throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 93throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); 95throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 119throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 130throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxMustBeSealed); 156throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 307throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 353throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxMustBeSealed);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (3)
84throw new InvalidOperationException(SR.Cryptography_Pkcs12_CertBagNotX509); 95throw new CryptographicException(SR.Argument_InvalidOidValue); 112throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (6)
42SR.Format( 43SR.Cryptography_Pkcs12_WrongModeForVerify, 66throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 98throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 104throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 150throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (15)
70throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 79throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 91throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 103throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 116throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); 118throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 145throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 173throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 220SR.Format( 221SR.Cryptography_Pkcs12_WrongModeForDecrypt, 231throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 239throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 244throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 280throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted); 358throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (3)
91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 192throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 223throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (7)
40throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "asnEncodedData.Oid"), nameof(asnEncodedData)); 43throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 45throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 79throw new ArgumentException(SR.Cryptography_Pkcs9_AttributeMismatch);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (10)
45throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 53SR.Format(SR.Cryptography_Encryption_MessageTooLong, modulusSizeInBytes - Pkcs1PaddingOverhead)); 75throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 112throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 127throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 135SR.Format(SR.Cryptography_Encryption_MessageTooLong, modulusSizeInBytes - Pkcs1PaddingOverhead)); 157throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 192throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.ImportExport.cs (1)
87throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (5)
51throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 73throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 94throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 111throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 159throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (2)
25throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 51throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.Pkcs1.cs (5)
27SR.Format( 28SR.Cryptography_RSAPrivateKey_VersionTooNew, 99throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 115throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 125throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (7)
130throw new CryptographicException(SR.Cryptography_KeyTooSmall); 265throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 273throw new CryptographicException(SR.Cryptography_KeyTooSmall); 311SR.Format(SR.Cryptography_Encryption_MessageTooLong, maxInput)); 393throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 405throw new CryptographicException(SR.Cryptography_KeyTooSmall);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (18)
137SR.Format(SR.Argument_DestinationImprecise, signatureSizeInBytes), 146SR.Argument_SignatureContextTooLong255); 223SR.Argument_SignatureContextTooLong255); 321SR.Format(SR.Argument_DestinationImprecise, Algorithm.SignatureSizeInBytes), 330SR.Argument_SignatureContextTooLong255); 428SR.Argument_SignatureContextTooLong255); 1082SR.Format(SR.Argument_DestinationImprecise, publicKeySizeInBytes), 1133SR.Format(SR.Argument_DestinationImprecise, privateKeySizeInBytes), 1235throw new CryptographicException(SR.Argument_PublicKeyWrongSizeForAlgorithm); 1297throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1686throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1736throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source)); 2002throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(SlhDsa)));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsaAlgorithm.cs (2)
263SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, algorithmId));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (5)
539throw new ArgumentException(SR.Argument_EmptyString, nameof(hashAlgorithm)); 566throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName)); 605throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_KOut_Too_Large); 610throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_NeedNonNegNum);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellman.cs (17)
152SR.Format(SR.Argument_DestinationImprecise, SecretAgreementSizeInBytes), 189SR.Format(SR.Argument_DestinationImprecise, SecretAgreementSizeInBytes), 253SR.Format(SR.Argument_DestinationImprecise, PrivateKeySizeInBytes), 298SR.Format(SR.Argument_DestinationImprecise, PublicKeySizeInBytes), 913throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source)); 969throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1023throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1028throw new CryptographicException(SR.Argument_PublicKeyWrongSizeForAlgorithm); 1590throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1599throw new CryptographicException(SR.Argument_PrivateKeyWrongSizeForAlgorithm); 1613throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, paramName); 1621SR.Format(SR.Cryptography_AlgorithmNotSupported,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (3)
31throw new ArgumentException(SR.Cryptography_ArgX25519RequiresX25519Key, nameof(key)); 245throw new CryptographicException(SR.Cryptography_NotValidPrivateKey); 255throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanImplementation.Windows.cs (1)
276throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519WindowsHelpers.cs (2)
44throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 56throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoaderLimits.cs (1)
146throw new InvalidOperationException(SR.Cryptography_X509_PKCS12_LimitsReadOnly);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoadLimitExceededException.cs (2)
20: base(SR.Format(SR.Cryptography_X509_PKCS12_LimitExceeded, propertyName))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (5)
599ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE); 638ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE); 662throw new CryptographicException(SR.Arg_CryptographyException, e); 666throw new CryptographicException(SR.Arg_CryptographyException, e); 731throw new ArgumentException(SR.Argument_EmptyString, paramName);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (18)
83throw new CryptographicException(SR.Cryptography_Pfx_NoCertificates); 149throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 184ThrowWithHResult(SR.Cryptography_Pfx_BadPassword, ERROR_INVALID_PASSWORD); 257throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 269ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE, e); 512throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 520throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 525throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 558throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 567throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 595SR.Format( 596SR.Cryptography_UnknownAlgorithmIdentifier, 602throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 613SR.Format( 614SR.Cryptography_UnknownAlgorithmIdentifier, 1017ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE); 1030ThrowWithHResult(SR.Cryptography_Pfx_BadPassword, ERROR_INVALID_PASSWORD, pnse); 1186throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\Aes.cs (24)
68SR.Cryptography_KeyWrap_Plaintext_InvalidLength); 75SR.Cryptography_PlaintextTooLarge); 137SR.Format(SR.Argument_DestinationImprecise, requiredLength), 143throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 228throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 268throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 331throw new CryptographicException(SR.Cryptography_KeyWrap_DecryptFailed); 397SR.Cryptography_PlaintextTooLarge); 417throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(plaintext)); 432throw new ArgumentException(SR.Arg_EmptySpan, nameof(plaintext)); 460throw new ArgumentException(SR.Arg_EmptySpan, nameof(plaintext)); 467SR.Format(SR.Argument_DestinationImprecise, requiredLength), 473throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 510throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 547throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 554throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 585throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 603throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 728throw new CryptographicException(SR.Cryptography_KeyWrap_DecryptFailed); 897SR.Cryptography_KeyWrap_Plaintext_InvalidLength, 904SR.Cryptography_PlaintextTooLarge, 919SR.Cryptography_KeyWrap_Ciphertext_InvalidLength,
System\Security\Cryptography\AesCcm.cs (5)
94throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 97throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 100throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag)); 107throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(AesCcm)));
System\Security\Cryptography\AesCng.Windows.cs (2)
302throw new CryptographicException(SR.Cryptography_InvalidKeySize); 330throw new CryptographicException(SR.Cryptography_InvalidCipherMode);
System\Security\Cryptography\AesImplementation.cs (4)
273throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 279throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 303throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\AsnEncodedDataCollection.cs (4)
71throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 73throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 75throw new ArgumentException(SR.Argument_InvalidOffLen); 92throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
System\Security\Cryptography\AsymmetricAlgorithm.cs (10)
18throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported); 35throw new CryptographicException(SR.Cryptography_InvalidKeySize); 97throw new NotImplementedException(SR.NotSupported_SubclassOverride); 105throw new NotImplementedException(SR.NotSupported_SubclassOverride); 109throw new NotImplementedException(SR.NotSupported_SubclassOverride); 112throw new NotImplementedException(SR.NotSupported_SubclassOverride); 148throw new NotImplementedException(SR.NotSupported_SubclassOverride); 157throw new NotImplementedException(SR.NotSupported_SubclassOverride); 161throw new NotImplementedException(SR.NotSupported_SubclassOverride); 164throw new NotImplementedException(SR.NotSupported_SubclassOverride);
System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (2)
27SR.Cryptography_UnknownSignatureFormat, 48SR.Cryptography_UnknownSignatureFormat,
System\Security\Cryptography\Base64Transforms.cs (2)
391public static void ThrowArgumentOutOfRange(ExceptionArgument argument) => throw new ArgumentOutOfRangeException(argument.ToString(), SR.ArgumentOutOfRange_NeedNonNegNum); 393public static void ThrowInvalidOffLen() => throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\BasicSymmetricCipherLiteBCrypt.cs (1)
78throw new CryptographicException(SR.Cryptography_UnexpectedTransformTruncation);
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (2)
48_ => throw new CryptographicException(SR.Cryptography_InvalidCipherMode), 88throw new CryptographicException(SR.Cryptography_UnexpectedTransformTruncation);
System\Security\Cryptography\CapiHelper.DSA.Windows.cs (1)
48throw new CryptographicException(SR.Cryptography_InvalidDSASignatureSize);
System\Security\Cryptography\CapiHelper.Windows.cs (12)
540throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 614throw new CryptographicException(SR.CryptSetKeyParam_Failed, GetErrorCode().ToString()); 639throw new CryptographicException(SR.CryptSetKeyParam_Failed, GetErrorCode().ToString()); 715throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, flags), nameof(flags)); 755throw new CryptographicException(SR.Format(SR.Cryptography_CSP_WrongKeySpec, keyType)); 1039throw new CryptographicException(SR.Cryptography_InvalidOID); 1096throw new ArgumentException(SR.Argument_InvalidValue, nameof(hashAlg)); 1112_ => throw new ArgumentException(SR.Argument_InvalidValue, nameof(hashAlg)), 1123_ => throw new ArgumentException(SR.Argument_InvalidValue, nameof(hashAlg)), 1284throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_InvalidIV);
System\Security\Cryptography\ChaCha20Poly1305.cs (6)
46throw new CryptographicException(SR.Cryptography_InvalidKeySize); 99throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 102throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 105throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag)); 112throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(ChaCha20Poly1305)));
System\Security\Cryptography\CngAlgorithmCore.cs (4)
112throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.Value.CurveType.ToString())); 127throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.Value.Oid.FriendlyName), e);
System\Security\Cryptography\CngHelpers.cs (13)
78throw new CryptographicException(SR.Cryptography_KeyBlobParsingError); 82throw new CryptographicException(SR.Cryptography_KeyBlobParsingError); 90throw new CryptographicException(SR.Format(SR.Cryptography_CngKeyWrongAlgorithm, algorithmName, algorithm)); 94throw new CryptographicException(SR.Cryptography_KeyBlobParsingError); 99throw new CryptographicException(SR.Cryptography_KeyBlobParsingError); 103throw new CryptographicException(SR.Cryptography_KeyBlobParsingError); 115throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 128throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 141throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 160throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 283throw new CryptographicException(SR.Cryptography_NotValidPrivateKey); 293throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
System\Security\Cryptography\CngKey.EC.cs (2)
64throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, algorithm));
System\Security\Cryptography\CngKey.OpenHandle.cs (2)
24throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(keyHandle)); 67throw new ArgumentException(SR.Cryptography_OpenEphemeralKeyHandleWithoutEphemeralFlag, nameof(keyHandleOpenOptions));
System\Security\Cryptography\CngSymmetricAlgorithmCore.cs (14)
47throw new CryptographicException(SR.Format(SR.Cryptography_CngKeyWrongAlgorithm, actualAlgorithm.Algorithm, algorithm)); 63SR.Format( 64SR.Cryptography_CngKeyWrongAlgorithm, 173throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv)); 178throw new CryptographicException(SR.Cryptography_MissingIV); 204throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 298throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedbackSizeInBits, CipherMode.CFB)); 305throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedbackSizeInBits, CipherMode.CFB)); 314throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 322SR.Format( 323SR.Cryptography_InvalidKey_Weak,
System\Security\Cryptography\ConcurrencyBlock.cs (1)
19throw new CryptographicException(SR.Cryptography_ConcurrentUseNotSupported);
System\Security\Cryptography\CryptoConfig.cs (3)
315throw new ArgumentException(SR.Cryptography_AlgorithmTypesMustBeVisible, nameof(algorithm)); 585throw new CryptographicUnexpectedOperationException(SR.Cryptography_InvalidOID); 612throw new CryptographicUnexpectedOperationException(SR.Cryptography_Config_EncodedOIDError);
System\Security\Cryptography\CryptographicOperations.cs (12)
191throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 500throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 837throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 928throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 1023throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 1090throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 1134throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)); 1142throw new ArgumentException(SR.Argument_DestinationTooShort, "destination");
System\Security\Cryptography\CryptographicUnexpectedOperationException.cs (3)
15: base(SR.Arg_CryptographyException) 20: base(message ?? SR.Arg_CryptographyException) 25: base(message ?? SR.Arg_CryptographyException, inner)
System\Security\Cryptography\CryptoStream.cs (15)
51throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(stream)); 59throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(stream)); 65throw new ArgumentException(SR.Argument_InvalidValue, nameof(mode)); 93get { throw new NotSupportedException(SR.NotSupported_UnseekableStream); } 98get { throw new NotSupportedException(SR.NotSupported_UnseekableStream); } 99set { throw new NotSupportedException(SR.NotSupported_UnseekableStream); } 138throw new NotSupportedException(SR.Cryptography_CryptoStream_FlushFinalBlockTwice); 209throw new NotSupportedException(SR.NotSupported_UnseekableStream); 214throw new NotSupportedException(SR.NotSupported_UnseekableStream); 227return ValueTask.FromException<int>(new NotSupportedException(SR.NotSupported_UnreadableStream)); 305throw new NotSupportedException(SR.NotSupported_UnreadableStream); 466return ValueTask.FromException(new NotSupportedException(SR.NotSupported_UnwritableStream)); 529throw new NotSupportedException(SR.NotSupported_UnwritableStream); 748throw new NotSupportedException(SR.NotSupported_UnwritableStream); 751throw new NotSupportedException(SR.NotSupported_UnreadableStream);
System\Security\Cryptography\CspKeyContainerInfo.Windows.cs (2)
211throw new CryptographicException(SR.Cryptography_CSP_NotFound); 244throw new CryptographicException(SR.Cryptography_CSP_NotFound);
System\Security\Cryptography\CspParameters.cs (2)
43throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\DES.cs (5)
54throw new ArgumentException(SR.Cryptography_InvalidKeySize); 57throw new CryptographicException(SR.Cryptography_InvalidKey_Weak, "DES"); 60throw new CryptographicException(SR.Cryptography_InvalidKey_SemiWeak, "DES"); 69throw new CryptographicException(SR.Cryptography_InvalidKeySize); 87throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\DESCryptoServiceProvider.Windows.cs (4)
71throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 74throw new CryptographicException(SR.Cryptography_InvalidKey_Weak, "DES"); 76throw new CryptographicException(SR.Cryptography_InvalidKey_SemiWeak, "DES"); 93throw new CryptographicException(SR.Cryptography_InvalidIVSize);
System\Security\Cryptography\DesImplementation.cs (6)
66throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 69throw new CryptographicException(SR.Cryptography_InvalidKey_Weak, "DES"); 71throw new CryptographicException(SR.Cryptography_InvalidKey_SemiWeak, "DES"); 77throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 237throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\DSA.cs (1)
919new NotImplementedException(SR.NotSupported_SubclassOverride);
System\Security\Cryptography\DSA.Xml.cs (4)
23SR.Format(SR.Cryptography_InvalidFromXmlString, nameof(DSA), name)); 68SR.Format( 69SR.Cryptography_InvalidFromXmlString,
System\Security\Cryptography\DSACng.cs (1)
29throw new ArgumentException(SR.Cryptography_ArgDSARequiresDSAKey, nameof(key));
System\Security\Cryptography\DSACng.Key.cs (1)
33throw new ArgumentException(SR.Cryptography_ArgDSARequiresDSAKey, nameof(value));
System\Security\Cryptography\DSACryptoServiceProvider.Windows.cs (5)
454throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 468throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 485throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 490throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashSize, "SHA1", SHA1.HashSizeInBytes));
System\Security\Cryptography\DSASignatureDeformatter.cs (2)
31throw new CryptographicUnexpectedOperationException(SR.Cryptography_InvalidOperation); 41throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\DSASignatureFormat.cs (2)
47SR.Format(SR.Cryptography_UnknownSignatureFormat, signatureFormat));
System\Security\Cryptography\DSASignatureFormatter.cs (2)
31throw new CryptographicUnexpectedOperationException(SR.Cryptography_InvalidOperation); 40throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\ECAlgorithm.cs (4)
41throw new NotSupportedException(SR.NotSupported_SubclassOverride); 56throw new NotSupportedException(SR.NotSupported_SubclassOverride); 68throw new NotSupportedException(SR.NotSupported_SubclassOverride); 80throw new NotSupportedException(SR.NotSupported_SubclassOverride);
System\Security\Cryptography\EccKeyFormatHelper.cs (29)
86throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 108throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 120throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 127throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 133throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 175throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 182throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 189throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 195throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 223throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 239throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 253throw new CryptographicException(SR.Cryptography_ECC_NamedCurvesOnly); 274throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 287throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 292throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 313throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 333throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 346throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 367throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 374throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 395throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 426throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 487throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 531SR.Format(SR.Cryptography_CurveNotSupported, ecParameters.Curve.CurveType.ToString())); 641throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 692throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 705throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 714throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve);
System\Security\Cryptography\ECCurve.cs (9)
81throw new ArgumentException(SR.Format(SR.Cryptography_InvalidCurveOid, value.Value)); 189throw new CryptographicException(SR.Cryptography_InvalidECNamedCurve); 195throw new CryptographicException(SR.Format(SR.Cryptography_InvalidCurveOid, Oid?.Value)); 223throw new CryptographicException(SR.Cryptography_InvalidECPrimeCurve); 236throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 245throw new CryptographicException(SR.Format(SR.Cryptography_CurveNotSupported, CurveType.ToString()));
System\Security\Cryptography\ECDiffieHellman.cs (1)
167return new NotImplementedException(SR.NotSupported_SubclassOverride);
System\Security\Cryptography\ECDiffieHellman.Xml.cs (2)
10throw new NotImplementedException(SR.Cryptography_ECXmlSerializationFormatRequired); 15throw new NotImplementedException(SR.Cryptography_ECXmlSerializationFormatRequired);
System\Security\Cryptography\ECDiffieHellmanCng.cs (1)
29throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(key));
System\Security\Cryptography\ECDiffieHellmanCng.Derive.cs (5)
47throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(otherPartyPublicKey)); 49throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey)); 79throw new InvalidOperationException(SR.Cryptography_TlsRequiresLabelAndSeed); 132throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(otherPartyPublicKey)); 134throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey));
System\Security\Cryptography\ECDiffieHellmanCng.Key.cs (7)
41throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(value)); 59throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_InvalidCurveOid, curve.Oid.Value)); 81throw new ArgumentException(SR.Cryptography_InvalidKeySize); 94throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString())); 126throw new ArgumentException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\ECDiffieHellmanCngPublicKey.cs (1)
76throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey);
System\Security\Cryptography\ECDiffieHellmanPublicKey.cs (1)
43throw new NotImplementedException(SR.NotSupported_SubclassOverride);
System\Security\Cryptography\ECDiffieHellmanPublicKey.ExportParameters.cs (2)
21throw new NotSupportedException(SR.NotSupported_SubclassOverride); 30throw new NotSupportedException(SR.NotSupported_SubclassOverride);
System\Security\Cryptography\ECDsa.cs (5)
374throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 407throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 671throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 716throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1262throw new NotSupportedException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\ECDsa.Xml.cs (2)
13throw new NotImplementedException(SR.Cryptography_ECXmlSerializationFormatRequired); 18throw new NotImplementedException(SR.Cryptography_ECXmlSerializationFormatRequired);
System\Security\Cryptography\ECDsaCng.cs (1)
47throw new ArgumentException(SR.Cryptography_ArgECDsaRequiresECDsaKey, nameof(key));
System\Security\Cryptography\ECDsaCng.Key.cs (7)
31throw new ArgumentException(SR.Cryptography_ArgECDsaRequiresECDsaKey, nameof(value)); 48throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_InvalidCurveOid, curve.Oid.Value)); 70throw new ArgumentException(SR.Cryptography_InvalidKeySize); 83throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString())); 109throw new ArgumentException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\ECParameters.cs (1)
58throw new CryptographicException(SR.Cryptography_InvalidCurveKeyParameters);
System\Security\Cryptography\HashAlgorithm.cs (8)
23throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported); 38throw new CryptographicUnexpectedOperationException(SR.Cryptography_HashNotYetFinalized); 68throw new InvalidOperationException(SR.InvalidOperation_IncorrectImplementation); 82throw new ArgumentException(SR.Argument_InvalidValue); 84throw new ArgumentException(SR.Argument_InvalidOffLen); 240throw new ArgumentException(SR.Argument_InvalidValue); 242throw new ArgumentException(SR.Argument_InvalidOffLen); 275throw new InvalidOperationException(SR.InvalidOperation_IncorrectImplementation);
System\Security\Cryptography\HashAlgorithmName.cs (2)
195throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashAlgorithmOid, oidValue));
System\Security\Cryptography\HashProvider.cs (1)
27throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\HashStatic.cs (7)
44throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 70throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 73throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 84throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 95throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 109throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 112throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Helpers.cs (16)
45throw new CryptographicException(SR.Cryptography_MissingIV); 175throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 190throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 197throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 313throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 320throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 357throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 460throw new CryptographicException(SR.Cryptography_HashAlgorithmNameNullOrEmpty); 463throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 473throw new CryptographicException(SR.Cryptography_HashAlgorithmNameNullOrEmpty); 475throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 479throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.EncryptionAlgorithm)); 486throw new ArgumentException(SR.Argument_PasswordNullChars, nameof(password));
System\Security\Cryptography\HKDF.cs (16)
57throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 92throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 98throw new ArgumentOutOfRangeException(nameof(outputLength), SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength)); 123throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output)); 126throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 131throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output)); 159throw new ArgumentOutOfRangeException(nameof(outputLength), SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength)); 180throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output)); 185throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
System\Security\Cryptography\HMAC.cs (7)
23throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported); 46throw new PlatformNotSupportedException(SR.HashNameMultipleSetNotSupported); 63throw new PlatformNotSupportedException(SR.CryptoConfigNotSupported); 66throw new PlatformNotSupportedException(SR.CryptoConfigNotSupported); 69throw new PlatformNotSupportedException(SR.CryptoConfigNotSupported); 72throw new PlatformNotSupportedException(SR.CryptoConfigNotSupported); 75throw new PlatformNotSupportedException(SR.CryptoConfigNotSupported);
System\Security\Cryptography\HMACCommon.cs (2)
101throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashAlgorithmId));
System\Security\Cryptography\HMACStatic.cs (15)
27throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 63throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 90throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 93throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 104throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 125throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 147throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 150throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 175throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 178throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 208throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 211throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\IncrementalHash.cs (5)
94throw new ArgumentException(SR.Argument_InvalidOffLen); 154throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 477throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, ih.HashLengthInBytes), nameof(hash));
System\Security\Cryptography\KeyBlobHelpers.cs (2)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 55throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
System\Security\Cryptography\KeyedHashAlgorithm.cs (1)
15throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported);
System\Security\Cryptography\Kmac128.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Kmac256.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacStatic.cs (3)
194throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 200throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 206throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof128.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof256.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Oid.cs (5)
46throw new CryptographicException(SR.Cryptography_Oid_InvalidName); 57throw new CryptographicException(SR.Cryptography_Oid_InvalidValue); 71throw new PlatformNotSupportedException(SR.Cryptography_Oid_SetOnceValue); 99throw new PlatformNotSupportedException(SR.Cryptography_Oid_SetOnceFriendlyName); 126throw new PlatformNotSupportedException(SR.Cryptography_Oid_SetOnceValue);
System\Security\Cryptography\OidCollection.cs (4)
77throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 79throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 81throw new ArgumentException(SR.Argument_InvalidOffLen); 97throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
System\Security\Cryptography\OpenSsl.NotSupported.cs (27)
19throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 29throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 39throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 49throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 59throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 77throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 87throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 97throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 107throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 117throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 134throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 144throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 154throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 164throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 174throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 190throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 200throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 210throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 220throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 230throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 246throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 256throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 265throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 273throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 281throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 289throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 297throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL);
System\Security\Cryptography\PasswordDeriveBytes.cs (4)
77throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_ValuesFixed, nameof(HashName)); 91throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_ValuesFixed, nameof(IterationCount)); 106throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_ValuesFixed, nameof(Salt)); 263throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_TooManyBytes);
System\Security\Cryptography\PasswordDeriveBytes.Windows.cs (4)
18throw new CryptographicException(SR.Cryptography_InvalidKeySize); 22throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_InvalidAlgorithm); 26throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_InvalidAlgorithm); 29throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_InvalidIV);
System\Security\Cryptography\PemEncoding.cs (10)
43throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 73throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 385throw new ArgumentOutOfRangeException(nameof(labelLength), SR.Argument_PemEncoding_EncodedSizeTooLarge); 387throw new ArgumentOutOfRangeException(nameof(dataLength), SR.Argument_PemEncoding_EncodedSizeTooLarge); 412throw new ArgumentException(SR.Argument_PemEncoding_EncodedSizeTooLarge); 461throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 524throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(utf8Label)); 578throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(utf8Label)); 662throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 705throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label));
System\Security\Cryptography\PemKeyHelpers.cs (6)
118throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 132throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input)); 186throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 197throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 212throw new ArgumentException(SR.Argument_PemImport_EncryptedPem, nameof(input)); 218throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input));
System\Security\Cryptography\PKCS1MaskGenerationMethod.cs (2)
33throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashNameValue));
System\Security\Cryptography\RandomNumberGenerator.cs (5)
106throw new ArgumentException(SR.Argument_InvalidRandomRange); 182throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 205throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 232throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 445throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\RC2.cs (4)
45throw new CryptographicException(SR.Cryptography_RC2_EKSKS); 63throw new CryptographicException(SR.Cryptography_RC2_EKSKS); 67throw new CryptographicException(SR.Cryptography_RC2_EKS40); 73throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\RC2CryptoServiceProvider.Windows.cs (3)
40throw new CryptographicUnexpectedOperationException(SR.Cryptography_RC2_EKSKS2); 87throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 103throw new CryptographicException(SR.Cryptography_InvalidIVSize);
System\Security\Cryptography\RC2Implementation.cs (13)
23throw new CryptographicUnexpectedOperationException(SR.Cryptography_RC2_EKSKS2); 64throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 70throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 89throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 113throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 138throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 163throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 188throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 199throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 205throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\Rfc2898DeriveBytes.cs (4)
251throw new CryptographicException(SR.Cryptography_HashAlgorithmNameNullOrEmpty); 263throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)); 287throw new CryptographicException(SR.Cryptography_ExceedKdfExtractLimit);
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (2)
348throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
System\Security\Cryptography\RijndaelImplementation.cs (2)
39throw new PlatformNotSupportedException(SR.Cryptography_Rijndael_BlockSize); 43throw new CryptographicException(SR.Cryptography_Rijndael_BlockSize);
System\Security\Cryptography\RijndaelManaged.cs (2)
35throw new PlatformNotSupportedException(SR.Cryptography_Rijndael_BlockSize); 39throw new CryptographicException(SR.Cryptography_Rijndael_BlockSize);
System\Security\Cryptography\RSA.cs (12)
80throw new CryptographicException(SR.Cryptography_InvalidKeySize); 220throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 303throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 360new NotImplementedException(SR.NotSupported_SubclassOverride); 365throw new NotSupportedException(SR.NotSupported_Method); // Same as Desktop 370throw new NotSupportedException(SR.NotSupported_Method); // Same as Desktop 529throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 631throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 905throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 932throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 1398throw new CryptographicException(SR.Argument_DestinationTooShort); 1417throw new CryptographicException(SR.Argument_DestinationTooShort);
System\Security\Cryptography\RSA.Xml.cs (2)
20SR.Format(SR.Cryptography_InvalidFromXmlString, nameof(RSA), name));
System\Security\Cryptography\RSABCrypt.cs (9)
192throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 210throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 238SR.Format( 239SR.Cryptography_Encryption_MessageTooLong, 255throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 274throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 301throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 351throw new CryptographicException(SR.Cryptography_UnsupportedPaddingMode); 439throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey);
System\Security\Cryptography\RSACng.cs (1)
29throw new ArgumentException(SR.Cryptography_ArgRSARequiresRSAKey, nameof(key));
System\Security\Cryptography\RSACng.Key.cs (1)
33throw new ArgumentException(SR.Cryptography_ArgRSARequiresRSAKey, nameof(value));
System\Security\Cryptography\RSACryptoServiceProvider.Windows.cs (4)
462throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 560_ => throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name), 624throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 684return new CryptographicException(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\RSAOAEPKeyExchangeDeformatter.cs (1)
27throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\RSAOAEPKeyExchangeFormatter.cs (1)
70throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\RSAPKCS1KeyExchangeDeformatter.cs (1)
37throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\RSAPKCS1KeyExchangeFormatter.cs (1)
51throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\RSAPKCS1SignatureDeformatter.cs (2)
51throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingAlgorithm); 53throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\RSAPKCS1SignatureFormatter.cs (2)
51throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingAlgorithm); 53throw new CryptographicUnexpectedOperationException(SR.Cryptography_FormatterMissingKey);
System\Security\Cryptography\Shake128.cs (5)
357throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 385throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 421throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 463throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 489throw new InvalidOperationException(SR.InvalidOperation_AlreadyReading);
System\Security\Cryptography\Shake256.cs (5)
357throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 385throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 421throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 463throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 489throw new InvalidOperationException(SR.InvalidOperation_AlreadyReading);
System\Security\Cryptography\SymmetricAlgorithm.cs (41)
20throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported); 36throw new CryptographicException(SR.Cryptography_InvalidFeedbackSize); 52throw new CryptographicException(SR.Cryptography_InvalidBlockSize); 76throw new CryptographicException(SR.Cryptography_InvalidIVSize); 97throw new CryptographicException(SR.Cryptography_InvalidKeySize); 115throw new CryptographicException(SR.Cryptography_InvalidKeySize); 150throw new CryptographicException(SR.Cryptography_InvalidCipherMode); 166throw new CryptographicException(SR.Cryptography_InvalidPaddingMode); 232throw new CryptographicException(SR.Cryptography_InvalidKeySize); 369throw new InvalidOperationException(SR.InvalidOperation_UnsupportedBlockSize); 377throw new ArgumentException(SR.Cryptography_MatchBlockSize, nameof(plaintextLength)); 387throw new ArgumentOutOfRangeException(nameof(plaintextLength), SR.Cryptography_PlaintextTooLarge); 392throw new ArgumentOutOfRangeException(nameof(paddingMode), SR.Cryptography_InvalidPaddingMode); 448throw new ArgumentException(SR.Argument_BitsMustBeWholeBytes, nameof(feedbackSizeInBits)); 456throw new ArgumentException(SR.Cryptography_MatchFeedbackSize, nameof(plaintextLength)); 466throw new ArgumentOutOfRangeException(nameof(plaintextLength), SR.Cryptography_PlaintextTooLarge); 471throw new ArgumentOutOfRangeException(nameof(paddingMode), SR.Cryptography_InvalidPaddingMode); 531throw new CryptographicException(SR.Argument_DestinationTooShort); 564throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 651throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptEcbCore))); 682throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 781throw new CryptographicException(SR.Argument_DestinationTooShort); 826throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 938throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCbcCore))); 979throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1132throw new CryptographicException(SR.Argument_DestinationTooShort); 1200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1374throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCfbCore))); 1432throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1519throw new NotSupportedException(SR.NotSupported_SubclassOverride); 1543throw new NotSupportedException(SR.NotSupported_SubclassOverride); 1574throw new NotSupportedException(SR.NotSupported_SubclassOverride); 1600throw new NotSupportedException(SR.NotSupported_SubclassOverride); 1629throw new NotSupportedException(SR.NotSupported_SubclassOverride); 1662throw new NotSupportedException(SR.NotSupported_SubclassOverride); 1668throw new ArgumentOutOfRangeException(nameof(paddingMode), SR.Cryptography_InvalidPaddingMode); 1674throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv)); 1681throw new ArgumentException(SR.Cryptography_InvalidFeedbackSize, nameof(feedbackSizeInBits));
System\Security\Cryptography\SymmetricPadding.cs (16)
21throw new CryptographicException(SR.Cryptography_PartialBlock); 32throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); 45throw new CryptographicException(SR.Cryptography_PartialBlock); 50throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 65throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 82throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 99throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 120throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 128throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); 146throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); 163throw new CryptographicException(SR.Cryptography_InvalidPadding); 169throw new CryptographicException(SR.Cryptography_InvalidPadding); 180throw new CryptographicException(SR.Cryptography_InvalidPadding); 191throw new CryptographicException(SR.Cryptography_InvalidPadding); 197throw new CryptographicException(SR.Cryptography_InvalidPadding); 210throw new CryptographicException(SR.Cryptography_UnknownPaddingMode);
System\Security\Cryptography\TripleDES.cs (5)
54throw new ArgumentException(SR.Cryptography_InvalidKeySize); 57throw new CryptographicException(SR.Format(SR.Cryptography_InvalidKey_Weak, "TripleDES")); 66throw new CryptographicException(SR.Cryptography_InvalidKeySize); // .NET Framework compat: Strange exception for a null value, but this is what we threw in classic CLR. 69throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\TripleDesImplementation.cs (4)
58throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 64throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 234throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\UniversalCryptoDecryptor.cs (1)
72throw new CryptographicException(SR.Cryptography_PartialBlock);
System\Security\Cryptography\UniversalCryptoOneShot.cs (2)
21throw new CryptographicException(SR.Cryptography_PartialBlock); 29throw new CryptographicException(SR.Cryptography_InvalidPadding);
System\Security\Cryptography\UniversalCryptoTransform.cs (4)
76throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Cryptography_MustTransformWholeBlock); 78throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Argument_InvalidOffLen); 83throw new ArgumentOutOfRangeException(nameof(outputOffset), SR.Argument_InvalidOffLen); 98throw new ArgumentOutOfRangeException(nameof(inputCount), SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\Asn1\AccessDescriptionAsn.xml.cs (3)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 72throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\BasicConstraintsAsn.xml.cs (2)
82throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 99throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\CertificateAsn.xml.cs (2)
50throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\CertificatePolicyMappingAsn.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 40throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\CertificateTemplateAsn.xml.cs (3)
33throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestAsn.xml.cs (2)
50throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestInfoAsn.xml.cs (8)
45throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 76throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 93throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 171throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 181throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 202throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 219throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 239throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\Asn1\PolicyConstraintsAsn.xml.cs (2)
58throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 75throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\PolicyInformationAsn.xml.cs (4)
32throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 43throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 84throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.manual.cs (2)
41throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.xml.cs (4)
89throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 107throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 157throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 174throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (3)
91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 103throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 122throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\Asn1\ValidityAsn.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\CertificateExtensionsCommon.cs (3)
43throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 73throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 85throw new NotSupportedException(SR.NotSupported_KeyAlgorithm);
System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (2)
195throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHandle, nameof(handle)));
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.cs (2)
22throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 516throw new ArgumentException(SR.Argument_InvalidNameType);
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.Import.cs (1)
103SR.Cryptography_X509_PfxWithoutPassword_MaxAllowedIterationsExceeded,
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.PrivateKey.cs (6)
54throw new NotSupportedException(SR.NotSupported_ECDsa_Csp); 78csp => throw new NotSupportedException(SR.NotSupported_ECDiffieHellman_Csp), 199throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLKem))); 204throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(SlhDsa)));
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (29)
448throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 512throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 530SR.Format(SR.Cryptography_CertReq_NullValueInCollection, nameof(OtherRequestAttributes))); 536SR.Format(SR.Cryptography_CertReq_MissingOidInCollection, nameof(OtherRequestAttributes))); 541throw new InvalidOperationException(SR.Cryptography_CertReq_ExtensionRequestInOtherAttributes); 682throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 684throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 829throw new ArgumentException(SR.Cryptography_CertReq_IssuerRequiresPrivateKey, nameof(issuerCertificate)); 831throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 833throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 838SR.Format( 839SR.Cryptography_CertReq_AlgorithmMustMatch, 849SR.Format( 850SR.Cryptography_CertReq_NotBeforeNotNested, 869SR.Format( 870SR.Cryptography_CertReq_NotAfterNotNested, 885throw new ArgumentException(SR.Cryptography_CertReq_BasicConstraintsRequired, nameof(issuerCertificate)); 887throw new ArgumentException(SR.Cryptography_CertReq_IssuerBasicConstraintsInvalid, nameof(issuerCertificate)); 889throw new ArgumentException(SR.Cryptography_CertReq_IssuerKeyUsageInvalid, nameof(issuerCertificate)); 902throw new InvalidOperationException(SR.Cryptography_CertReq_RSAPaddingRequired); 916SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm), 1017throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 1019throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 1024throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 1073SR.Format(SR.Cryptography_CertReq_DuplicateExtension, extension.Oid.Value));
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (16)
46throw new ArgumentOutOfRangeException(nameof(options), options, SR.Argument_InvalidFlag); 80SR.Format(SR.Cryptography_NoPemOfLabel, PemLabels.Pkcs10CertificateRequest)); 130throw new ArgumentOutOfRangeException(nameof(options), options, SR.Argument_InvalidFlag); 163throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 170throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 179SR.Format( 180SR.Cryptography_CertReq_Load_VersionTooNew, 194throw new CryptographicException(SR.Cryptography_CertReq_SignatureVerificationFailed); 215SR.Cryptography_CertReq_Load_DuplicateExtensionRequests); 228SR.Cryptography_CertReq_Load_DuplicateExtensionRequests); 237throw new CryptographicException(SR.Cryptography_CertReq_Load_DuplicateExtensionRequests); 286throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 296throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 365SR.Format(SR.Cryptography_UnknownKeyAlgorithm, algorithmIdentifier.Algorithm));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (9)
138SR.Cryptography_CertReq_IssuerRequiresPrivateKey, 142throw new ArgumentException(SR.Cryptography_CRLBuilder_DatesReversed); 160SR.Cryptography_CertReq_BasicConstraintsRequired, 167SR.Cryptography_CertReq_IssuerBasicConstraintsInvalid, 174SR.Cryptography_CRLBuilder_IssuerKeyUsageInvalid, 189throw new ArgumentException(SR.Cryptography_CertReq_RSAPaddingRequired); 215SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm), 340throw new ArgumentException(SR.Cryptography_CRLBuilder_DatesReversed);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (3)
67throw new ArgumentException(SR.Cryptography_X509_CDP_NullValue, nameof(uris)); 96throw new CryptographicException(SR.Cryptography_Invalid_IA5String, e); 105throw new ArgumentException(SR.Cryptography_X509_CDP_MustNotBuildEmpty, nameof(uris));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (4)
138throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 146SR.Argument_InvalidSerialNumberBytes, 175SR.Cryptography_CRLBuilder_ReasonNotSupported); 317throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Load.cs (7)
54throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 103throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 119throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 163throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 192throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 289throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 296throw new CryptographicException(SR.Cryptography_NoPemOfLabel, PemLabels.X509CertificateRevocationList);
System\Security\Cryptography\X509Certificates\ChainPal.Windows.cs (1)
30throw new CryptographicException(SR.Cryptography_InvalidContextHandle, nameof(chainContext));
System\Security\Cryptography\X509Certificates\ChainPal.Windows.GetChainStatusInformation.cs (1)
41chainStatus[index].StatusInformation = SR.Unknown_Error;
System\Security\Cryptography\X509Certificates\DSACertificateExtensions.cs (3)
39throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 44throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 54throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (3)
36throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 41throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 45throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (3)
54SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)); 75throw new InvalidOperationException(SR.Cryptography_ECC_NamedCurvesOnly);
System\Security\Cryptography\X509Certificates\FindPal.cs (8)
155throw new CryptographicException(SR.Cryptography_X509_InvalidFindType); 167throw new CryptographicException(SR.Cryptography_X509_InvalidFindValue); 178throw new ArgumentException(SR.Argument_InvalidOidValue); 205throw new CryptographicException(SR.Cryptography_X509_InvalidFindValue); 222throw new ArgumentException(SR.Argument_InvalidOidValue); 227throw new ArgumentException(SR.Argument_InvalidOidValue); 229throw new ArgumentException(SR.Argument_InvalidOidValue); 239throw new ArgumentException(SR.Argument_InvalidOidValue);
System\Security\Cryptography\X509Certificates\PublicKey.cs (2)
165throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 468throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (3)
36throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 41throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 49throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (2)
80SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (3)
32throw new CryptographicException(SR.Cryptography_InvalidPaddingMode); 58SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\StorePal.Windows.cs (2)
26throw new CryptographicException(SR.Cryptography_InvalidStoreHandle, nameof(storeHandle)); 98throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen);
System\Security\Cryptography\X509Certificates\StorePal.Windows.Export.cs (1)
87throw new CryptographicException(SR.Cryptography_X509_InvalidContentType);
System\Security\Cryptography\X509Certificates\StorePal.Windows.Import.cs (1)
91SR.Cryptography_X509_PfxWithoutPassword_MaxAllowedIterationsExceeded,
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (5)
23throw new ArgumentOutOfRangeException(nameof(emailAddress), SR.Arg_EmptyOrNullString); 31throw new ArgumentOutOfRangeException(nameof(dnsName), SR.Arg_EmptyOrNullString); 63throw new ArgumentOutOfRangeException(nameof(registeredId), SR.Arg_EmptyOrNullString); 71throw new ArgumentOutOfRangeException(nameof(upn), SR.Arg_EmptyOrNullString); 115throw new CryptographicException(SR.Cryptography_Invalid_IA5String);
System\Security\Cryptography\X509Certificates\X500DirectoryStringHelper.cs (4)
16throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 33throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 43throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 60throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\X500DistinguishedName.cs (3)
103throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, "flag")); 155throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (5)
137throw new ArgumentException(SR.Argument_X500_EmailTooLong, nameof(emailAddress)); 226throw new ArgumentException(SR.Argument_X500_InvalidCountryOrRegion, nameof(twoLetterCode)); 375throw new ArgumentException(SR.Format(SR.Argument_Asn1_InvalidStringContents, stringEncodingType), paramName); 397throw new ArgumentException(SR.Argument_Asn1_InvalidCharacterString, nameof(stringEncodingType));
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (3)
93throw new InvalidOperationException(SR.Cryptography_X500_MultiValued); 119throw new InvalidOperationException(SR.Cryptography_X500_MultiValued); 149throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (4)
270throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 285throw new ArgumentException(SR.Cryptography_X509_AIA_NullValue); 300throw new CryptographicException(SR.Cryptography_Invalid_IA5String, e); 330throw new ArgumentException(SR.Cryptography_X509_AIA_MustNotBuildEmpty);
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (4)
327throw new ArgumentException(SR.Argument_InvalidSerialNumberBytes, nameof(serialNumber)); 428throw new ArgumentException(SR.Argument_InvalidSerialNumberBytes, nameof(serialNumber)); 474throw new CryptographicException(SR.Cryptography_X509_AKID_NoSKID); 584throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (12)
95throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 111throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 124throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 659throw new PlatformNotSupportedException(SR.NotSupported_ImmutableX509Certificate); 665throw new PlatformNotSupportedException(SR.NotSupported_ImmutableX509Certificate); 672throw new PlatformNotSupportedException(SR.NotSupported_ImmutableX509Certificate); 678throw new PlatformNotSupportedException(SR.NotSupported_ImmutableX509Certificate); 684throw new PlatformNotSupportedException(SR.NotSupported_ImmutableX509Certificate); 691throw new PlatformNotSupportedException(SR.NotSupported_ImmutableX509Certificate); 727throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHandle, "m_safeCertContext")); // Keeping "m_safeCertContext" string for backward compat sake. 767throw new CryptographicException(SR.Cryptography_X509_InvalidContentType);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (40)
287_ => throw new NotSupportedException(SR.NotSupported_KeyAlgorithm), 395throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 413throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 763throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 769throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 774throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 851throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 857throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 862throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 873throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 953throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 959throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 964throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 975throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1049throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 1055throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 1060throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1075throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1159throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 1165throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 1170throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1178throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1394_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)), 1482_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)), 1539throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 1553throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 1563throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 1720SR.Argument_InvalidHostnameOrIPAddress, 1737throw new CryptographicException(SR.Cryptography_X509_TooManySANs); 1909throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey); 1925throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ae); 1950throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ae); 1956throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey); 2044throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ce); 2057throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey); 2127throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ce); 2135throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey); 2220throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey);
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (5)
456throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 468throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 503throw new CryptographicException(SR.Cryptography_X509_ExportFailed); 530throw new CryptographicException(SR.Cryptography_X509_ExportFailed); 742throw new ArgumentException(SR.Argument_Thumbprint_Invalid, nameof(thumbprintHex));
System\Security\Cryptography\X509Certificates\X509CertificateCollection.cs (1)
112throw new ArgumentException(SR.Arg_InvalidType, nameof(value));
System\Security\Cryptography\X509Certificates\X509CertificateLoader.netcore.cs (4)
22ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE); 101throw new ArgumentException(SR.Argument_InvalidFlag, nameof(keyStorageFlags)); 112SR.Format(SR.Cryptography_X509_InvalidFlagCombination, persistenceFlags),
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Windows.cs (1)
135throw new CryptographicException(SR.Cryptography_Pfx_NoCertificates);
System\Security\Cryptography\X509Certificates\X509Chain.cs (4)
99throw new ArgumentException(SR.Cryptography_InvalidContextHandle, nameof(certificate)); 106throw new CryptographicException(SR.Cryptography_CustomTrustCertsInSystemMode); 112throw new CryptographicException(SR.Cryptography_InvalidTrustCertificate); 187throw new CryptographicException(SR.Cryptography_X509_ChainBuildingFailed);
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (5)
45throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 47throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 63throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 65throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 67throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\X509ChainPolicy.cs (8)
62throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 76throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 90throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 104throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\X509Certificates\X509EnhancedKeyUsageExtension.cs (1)
102throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\X509Extension.cs (1)
84throw new ArgumentException(SR.Cryptography_X509_ExtensionMismatch);
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (5)
42throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 44throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 82throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 84throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 86throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\X509KeyUsageExtension.cs (1)
76throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\X509Pal.Windows.PublicKey.cs (3)
33throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 46throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 69throw new NotSupportedException(SR.NotSupported_KeyAlgorithm);
System\Security\Cryptography\X509Certificates\X509SignatureGenerator.cs (1)
35throw new ArgumentException(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\X509Certificates\X509Store.cs (10)
40throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation))); 52_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeName))), 66throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation))); 90throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen); 131throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen); 134throw new CryptographicException(SR.Cryptography_InvalidHandle, "pCertContext"); 169throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen);
System\Security\Cryptography\X509Certificates\X509SubjectAlternativeNameExtension.cs (2)
133SR.Cryptography_X509_SAN_UnknownIPAddressSize); 144throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (5)
114throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 119throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 128throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(subjectKeyIdentifier)); 202throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, algorithm), nameof(algorithm));
System\Security\Cryptography\XmlKeyHelper.cs (1)
25throw new CryptographicException(SR.Cryptography_FromXmlParseError, e);