1376 references to SR
System.Security.Cryptography (1376)
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); 392throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.GetIntegerBytes.cs (1)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (8)
35throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, oid)); 68throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString())); 168throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 215throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 336throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 406throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.DigestAlgs.cs (4)
153throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId)); 178throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (4)
129throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 241throw new CryptographicException(SR.Cryptography_EnginesNotSupported); 271throw new CryptographicException(SR.Cryptography_EnginesNotSupported); 304throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSLProvidersNotSupported);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.ExportKeyContents.cs (1)
29throw new CryptographicException(SR.Cryptography_NotRetrievable);
src\libraries\Common\src\System\Security\Cryptography\AesAEAD.cs (1)
12throw new CryptographicException(SR.Cryptography_InvalidKeySize);
src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (8)
78throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tagSizeInBytes)); 296throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 299throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 308throw new ArgumentException(SR.Format(SR.Cryptography_IncorrectTagLength, tagSizeInBytes), nameof(tag)); 313throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag)); 321throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(AesGcm)));
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.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);
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (4)
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);
src\libraries\Common\src\System\Security\Cryptography\Asn1\CurveAsn.xml.cs (2)
55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 72throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\DigestInfoAsn.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (3)
84throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 125throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 137throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\DssParms.xml.cs (2)
50throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (3)
60throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 83throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 95throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECPrivateKey.xml.cs (2)
66throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 83throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\libraries\Common\src\System\Security\Cryptography\Asn1\EncryptedPrivateKeyInfoAsn.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\FieldID.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\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (5)
101throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 118throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 162throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 185throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 197throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (2)
87throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 99throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyBothAsn.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\libraries\Common\src\System\Security\Cryptography\Asn1\PBEParameter.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBES2Params.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2Params.xml.cs (2)
83throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 100throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (2)
76throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 88throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (2)
81throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 98throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.xml.cs (2)
55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 72throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\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\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (6)
66throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 116throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 141throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 173throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 185throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.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\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\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\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\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\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\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\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (2)
76throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 88throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\libraries\Common\src\System\Security\Cryptography\Asn1\PrivateKeyInfoAsn.xml.cs (2)
65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 82throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (7)
16throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 22SR.Cryptography_Pkcs_PssParametersMgfNotSupported, 28throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 38SR.Format( 39SR.Cryptography_Pkcs_PssParametersMgfHashMismatch, 54SR.Format( 55SR.Cryptography_Pkcs_PssParametersSaltMismatch,
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.xml.cs (2)
149throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 166throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPrivateKeyAsn.xml.cs (2)
62throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPublicKeyAsn.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\SpecifiedECDomain.xml.cs (3)
51throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 75throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 92throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.xml.cs (2)
48throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 65throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (3)
47throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 83throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 100throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (2)
233throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 247throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\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\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\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\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (8)
94throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 102throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MissingFields); 107throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPJ); 113throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPGY); 116throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedQX); 178throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 276SR.Cryptography_UnknownSignatureFormat, 341SR.Cryptography_UnknownSignatureFormat,
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (29)
102throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 124throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 136throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 143throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 149throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 190throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 197throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 204throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 210throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 237throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 253throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 267throw new CryptographicException(SR.Cryptography_ECC_NamedCurvesOnly); 288throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 301throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 306throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 327throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 347throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 360throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 381throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 388throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 409throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 440throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 499throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 552SR.Format(SR.Cryptography_CurveNotSupported, ecParameters.Curve.CurveType.ToString())); 662throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 713throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 726throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve); 735throw new CryptographicException(SR.Cryptography_InvalidECCharacteristic2Curve);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (1)
113throw new CryptographicException(SR.Cryptography_TlsRequires64ByteSeed);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (2)
137throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey)); 167throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSslPublicKey.cs (1)
18throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (2)
205SR.Cryptography_UnknownSignatureFormat, 281throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.cs (4)
77throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, oid)); 99SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString()));
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (11)
36SR.Format(SR.Cryptography_CurveNotSupported, parameters.Curve.CurveType.ToString())); 82throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 101throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 168throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 176throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 239throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 255throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 271throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 279throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, oid));
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (4)
112_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid)), 157SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, algorithmId));
src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (2)
31throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 66throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (8)
49throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 54throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 80throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 85throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 121throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 129throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 148throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 157throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (11)
113throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 142throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 149throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 298throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 329throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 356throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 379throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 398throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 411throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); 434throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 447throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (11)
124SR.Argument_SignatureContextTooLong255); 129throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 174SR.Argument_SignatureContextTooLong255); 626throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 653throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 680throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1033throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1071throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1109throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1289throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLDsa)));
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (29)
118SR.Format(SR.Argument_DestinationImprecise, Algorithm.CiphertextSizeInBytes), 125SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 131throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 201throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 207SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 239throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 282SR.Format(SR.Argument_DestinationImprecise, Algorithm.PrivateSeedSizeInBytes), 343throw new ArgumentException(SR.Argument_KemInvalidSeedLength, nameof(source)); 402throw new ArgumentException(SR.Argument_KemInvalidDecapsulationKeyLength, nameof(source)); 459throw new ArgumentException(SR.Argument_KemInvalidEncapsulationKeyLength, nameof(source)); 513SR.Format(SR.Argument_DestinationImprecise, Algorithm.DecapsulationKeySizeInBytes), 567SR.Format(SR.Argument_DestinationImprecise, Algorithm.EncapsulationKeySizeInBytes), 1189throw new CryptographicException(SR.Argument_KemInvalidEncapsulationKeyLength); 1666throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLKem))); 1674SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, identifier.Algorithm)); 1698throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1707throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1719throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1736throw new CryptographicException(SR.Cryptography_KemPkcs8KeyMismatch); 1751throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1764throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
50throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (42)
20return new CryptographicException(SR.Cryptography_AlgKdfRequiresChars, algId); 47SR.Cryptography_UnknownHashAlgorithm, 62SR.Cryptography_UnknownAlgorithmIdentifier, 80SR.Format( 81SR.Cryptography_UnknownAlgorithmIdentifier, 143SR.Format( 144SR.Cryptography_UnknownAlgorithmIdentifier, 243SR.Format( 244SR.Cryptography_UnknownAlgorithmIdentifier, 275SR.Format( 276SR.Cryptography_UnknownAlgorithmIdentifier, 301throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, prf.Name); 517throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 525SR.Format( 526SR.Cryptography_UnknownAlgorithmIdentifier, 574SR.Format(SR.Cryptography_AlgorithmNotSupported, algId)); 602throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 622throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 637throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 644throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 654throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 673throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 682throw new CryptographicException(SR.Cryptography_UnknownAlgorithmIdentifier, algId); 692throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 708throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 715throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 727throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 737SR.Format( 738SR.Cryptography_UnknownAlgorithmIdentifier, 745throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 755SR.Format( 756SR.Cryptography_UnknownAlgorithmIdentifier, 765throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 793throw new CryptographicException(SR.Argument_InvalidValue, e); 816throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 823throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 828throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 867throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1095throw new CryptographicException(SR.Argument_InvalidValue); 1106throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RC2)));
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\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\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\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\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (15)
59throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 68throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 80throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 92throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 105throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); 107throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 134throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 162throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 209SR.Format( 210SR.Cryptography_Pkcs12_WrongModeForDecrypt, 220throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 228throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 233throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 269throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted); 303throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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\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\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
101throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (7)
27throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 35SR.Format( 36SR.Cryptography_RSAPrivateKey_VersionTooNew, 86throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 262throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 278throw new CryptographicException(SR.Cryptography_InvalidRsaParameters); 288throw new CryptographicException(SR.Cryptography_NotValidPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (8)
180throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 500throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 616throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 668throw new CryptographicException(SR.Argument_InvalidValue); 671throw new CryptographicException(SR.Argument_InvalidValue); 716throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 818throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 880new CryptographicException(SR.Cryptography_InvalidPaddingMode);
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\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (14)
131SR.Format(SR.Argument_DestinationImprecise, signatureSizeInBytes), 140SR.Argument_SignatureContextTooLong255); 219SR.Argument_SignatureContextTooLong255); 858SR.Format(SR.Argument_DestinationImprecise, publicKeySizeInBytes), 909SR.Format(SR.Argument_DestinationImprecise, secretKeySizeInBytes), 1012throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1077throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1466throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1516throw new ArgumentException(SR.Argument_SecretKeyWrongSizeForAlgorithm, nameof(source)); 1724SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, identifier.Algorithm));
src\libraries\Common\src\System\Security\Cryptography\SlhDsaAlgorithm.cs (2)
208SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, algorithmId));
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\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoaderLimits.cs (1)
146throw new InvalidOperationException(SR.Cryptography_X509_PKCS12_LimitsReadOnly);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoadLimitExceededException.cs (2)
20: base(SR.Format(SR.Cryptography_X509_PKCS12_LimitExceeded, propertyName))
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\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (18)
81throw new CryptographicException(SR.Cryptography_Pfx_NoCertificates); 147throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 182ThrowWithHResult(SR.Cryptography_Pfx_BadPassword, ERROR_INVALID_PASSWORD); 255throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 267ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE, e); 466throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 474throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 479throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 512throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 521throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 547SR.Format( 548SR.Cryptography_UnknownAlgorithmIdentifier, 554throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 564SR.Format( 565SR.Cryptography_UnknownAlgorithmIdentifier, 702ThrowWithHResult(SR.Cryptography_Der_Invalid_Encoding, CRYPT_E_BAD_DECODE); 715ThrowWithHResult(SR.Cryptography_Pfx_BadPassword, ERROR_INVALID_PASSWORD, pnse); 871throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
38throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
System\Security\Cryptography\AesCcm.cs (5)
84throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 87throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 90throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag)); 97throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(AesCcm)));
System\Security\Cryptography\AesImplementation.cs (4)
260throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 266throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 290throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\AesImplementation.OpenSsl.cs (1)
60new CryptographicException(SR.Cryptography_InvalidKeySize)),
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 (3)
85throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 158SR.Cryptography_UnknownSignatureFormat, 179SR.Cryptography_UnknownSignatureFormat,
System\Security\Cryptography\Base64Transforms.cs (2)
386public static void ThrowArgumentOutOfRange(ExceptionArgument argument) => throw new ArgumentOutOfRangeException(argument.ToString(), SR.ArgumentOutOfRange_NeedNonNegNum); 388public static void ThrowInvalidOffLen() => throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\CapiHelper.Unix.cs (4)
18_ => throw new ArgumentException(SR.Argument_InvalidValue), 48_ => throw new ArgumentException(SR.Argument_InvalidValue), 62_ => throw new CryptographicException(SR.Cryptography_InvalidOID), 80throw new ArgumentException(SR.Argument_InvalidValue);
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\Cng.NotSupported.cs (43)
17throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 23throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 35throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 41throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 51throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 61throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 75throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 81throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 87throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 93throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 128throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 134throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 140throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 146throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 152throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 158throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 164throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 170throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 176throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 182throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 188throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 194throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 202throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 208throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 214throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 228throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 234throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 240throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 246throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 277throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 283throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 289throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 297throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 303throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 309throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 315throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 338throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 344throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 350throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 362throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 368throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 374throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng); 380throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyCng);
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 (6)
153throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 462throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 765throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 809throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)); 817throw 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.NotSupported.cs (2)
27return new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspKeyContainerInfo)));
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\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\DSACryptoServiceProvider.Unix.cs (22)
60throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 66throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 78get { throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspKeyContainerInfo))); } 104throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 112throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 120throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 135throw new CryptographicException(SR.Argument_InvalidValue); 167throw new CryptographicException(SR.Cryptography_InvalidKeySize); 206throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 214throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 222throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 233throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 235throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashSize, "SHA1", SHA1_HASHSIZE)); 239throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, str); 256throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, str); 264throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 272throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name); 280throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
System\Security\Cryptography\DSAOpenSsl.cs (4)
44throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 76throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle)); 116throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(DSAOpenSsl)));
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\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\ECDiffieHellmanOpenSsl.cs (5)
30throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 36throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 61throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle)); 89throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDiffieHellmanOpenSsl)));
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\ECDsaOpenSsl.cs (5)
30throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 36throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 61throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle)); 89throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDsaOpenSsl)));
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\Helpers.cs (16)
44throw new CryptographicException(SR.Cryptography_MissingIV); 174throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 189throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 196throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 301throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 308throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 326throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 429throw new CryptographicException(SR.Cryptography_HashAlgorithmNameNullOrEmpty); 432throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 442throw new CryptographicException(SR.Cryptography_HashAlgorithmNameNullOrEmpty); 444throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 448throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.EncryptionAlgorithm)); 455throw 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\HMACMD5.cs (7)
130throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 190throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 193throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 216throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 263throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 326throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 329throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA1.cs (7)
133throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 191throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 194throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 216throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 261throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 322throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 325throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA256.cs (7)
125throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 183throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 186throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 208throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 253throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 314throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 317throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_256.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_384.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_512.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA384.cs (7)
142throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 203throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 270throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 331throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 334throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA512.cs (7)
139throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 197throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 200throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 222throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 267throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 328throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 331throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\IncrementalHash.cs (3)
94throw new ArgumentException(SR.Argument_InvalidOffLen); 154throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\KeyedHashAlgorithm.cs (1)
15throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported);
System\Security\Cryptography\Kmac128.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Kmac256.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof128.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof256.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\MD5.cs (7)
90throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 147throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 150throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 172throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 198throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 235throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 238throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\MLDsaOpenSsl.OpenSsl.cs (2)
25throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 43throw new CryptographicException(SR.Cryptography_MLDsaInvalidAlgorithmHandle);
System\Security\Cryptography\MLKemOpenSsl.OpenSsl.cs (2)
28throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 49throw new CryptographicException(SR.Cryptography_KemInvalidAlgorithmHandle);
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\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.NotSupported.cs (2)
13throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CryptDeriveKey)));
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.Unix.cs (3)
87throw new CryptographicException(SR.Cryptography_InvalidKeySize); 118throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(UseSalt)));
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\RC2Implementation.OpenSsl.cs (2)
55throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RC2)));
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)); 917throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 965throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 1439throw new CryptographicException(SR.Argument_DestinationTooShort); 1458throw new CryptographicException(SR.Argument_DestinationTooShort);
System\Security\Cryptography\RSA.Xml.cs (2)
20SR.Format(SR.Cryptography_InvalidFromXmlString, nameof(RSA), name));
System\Security\Cryptography\RSACryptoServiceProvider.Unix.cs (13)
32throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 36throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 40throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspKeyContainerInfo))); 48throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 69throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 134throw new CryptographicException(SR.Argument_InvalidValue); 261throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 337return new CryptographicException(SR.Cryptography_InvalidPaddingMode); 372throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
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\RSAOpenSsl.cs (5)
44throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle)); 73throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 79throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 100throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(RSAOpenSsl)));
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\SafeEvpPKeyHandle.OpenSsl.cs (4)
68throw new InvalidOperationException(SR.Cryptography_OpenInvalidHandle); 138throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 191throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL); 243throw new PlatformNotSupportedException(SR.PlatformNotSupported_CryptographyOpenSSL);
System\Security\Cryptography\SHA1.cs (7)
86throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 141throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 144throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 165throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 190throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 229throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA256.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 141throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 144throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 165throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 190throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 229throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_256.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 177throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 180throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 205throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 234throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 274throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 277throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_384.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 178throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 181throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 206throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 235throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 275throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 278throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_512.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 177throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 180throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 205throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 234throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 274throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 277throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA384.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 140throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 143throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 164throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 189throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 228throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA512.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 140throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 143throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 164throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 189throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 228throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
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\SlhDsaOpenSsl.OpenSsl.cs (2)
25throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 61throw new CryptographicException(SR.Cryptography_SlhDsaInvalidAlgorithmHandle);
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)
79throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 96throw 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 (3)
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);
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointAsn.xml.cs (2)
75throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 92throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (3)
77throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 100throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 112throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
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)
86throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 104throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 154throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 171throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (3)
76throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 88throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 107throw 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\CertificatePolicy.cs (4)
300throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 332throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 363throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 386throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (29)
400throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 464throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 482SR.Format(SR.Cryptography_CertReq_NullValueInCollection, nameof(OtherRequestAttributes))); 488SR.Format(SR.Cryptography_CertReq_MissingOidInCollection, nameof(OtherRequestAttributes))); 493throw new InvalidOperationException(SR.Cryptography_CertReq_ExtensionRequestInOtherAttributes); 634throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 636throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 781throw new ArgumentException(SR.Cryptography_CertReq_IssuerRequiresPrivateKey, nameof(issuerCertificate)); 783throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 785throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 790SR.Format( 791SR.Cryptography_CertReq_AlgorithmMustMatch, 801SR.Format( 802SR.Cryptography_CertReq_NotBeforeNotNested, 821SR.Format( 822SR.Cryptography_CertReq_NotAfterNotNested, 837throw new ArgumentException(SR.Cryptography_CertReq_BasicConstraintsRequired, nameof(issuerCertificate)); 839throw new ArgumentException(SR.Cryptography_CertReq_IssuerBasicConstraintsInvalid, nameof(issuerCertificate)); 841throw new ArgumentException(SR.Cryptography_CertReq_IssuerKeyUsageInvalid, nameof(issuerCertificate)); 854throw new InvalidOperationException(SR.Cryptography_CertReq_RSAPaddingRequired); 868SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm), 969throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 971throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 976throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 1025SR.Format(SR.Cryptography_CertReq_DuplicateExtension, extension.Oid.Value));
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (15)
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); 168throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 175throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 184SR.Format( 185SR.Cryptography_CertReq_Load_VersionTooNew, 199throw new CryptographicException(SR.Cryptography_CertReq_SignatureVerificationFailed); 222SR.Cryptography_CertReq_Load_DuplicateExtensionRequests); 230SR.Cryptography_CertReq_Load_DuplicateExtensionRequests); 271throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 290throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 358SR.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 (6)
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); 291throw new CryptographicException(SR.Cryptography_NoPemOfLabel, PemLabels.X509CertificateRevocationList);
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\LegacyBasicConstraintsDecoder.NotSupported.cs (1)
21throw new PlatformNotSupportedException(SR.NotSupported_LegacyBasicConstraints);
System\Security\Cryptography\X509Certificates\ManagedCertificateFinder.cs (1)
169throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e);
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (17)
48throw new CryptographicException(SR.Arg_EmptyOrNullString); 59throw new CryptographicException(SR.Cryptography_X509_StoreNotFound); 116throw new CryptographicException(SR.Cryptography_X509_StoreReadOnly); 130throw new CryptographicException(SR.Cryptography_X509_StoreAddFailure, e); 216throw new CryptographicException(SR.Format(SR.Cryptography_InvalidFilePermissions, stream.Name)); 246throw new CryptographicException(SR.Cryptography_X509_StoreReadOnly); 316throw new CryptographicException(SR.Cryptography_X509_StoreNoFileAvailable); 343throw new CryptographicException(SR.Format(SR.Security_InvalidValue, nameof(storeName))); 370SR.Cryptography_FileStatusError, 376throw new CryptographicException(SR.Format(SR.Cryptography_OwnerNotCurrentUser, path)); 383throw new CryptographicException(SR.Format(SR.Cryptography_InvalidDirectoryPermissions, path)); 397string msg = SR.Format(SR.Cryptography_Unix_X509_DisallowedStoreNotEmpty, storePath);
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (2)
30throw new CryptographicException(SR.Cryptography_OpenInvalidHandle); 67throw new CryptographicException(SR.Cryptography_InvalidHandle);
System\Security\Cryptography\X509Certificates\OpenSslPkcsFormatReader.cs (1)
218throw new CryptographicException(SR.Cryptography_X509_PKCS7_NoSigner);
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (7)
28throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 68SR.Cryptography_X509_PfxWithoutPassword_MaxAllowedIterationsExceeded, 98SR.Cryptography_X509_PfxWithoutPassword_MaxAllowedIterationsExceeded, 410SR.Format(SR.Cryptography_Unix_X509_PropertyNotSettable, "Archived")); 420SR.Format(SR.Cryptography_Unix_X509_PropertyNotSettable, "FriendlyName"));
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
940StatusInformation = SR.Chain_NoPolicyMatch,
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (3)
18throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 26throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 43throw new NotSupportedException(SR.NotSupported_KeyAlgorithm);
System\Security\Cryptography\X509Certificates\PublicKey.cs (2)
133throw new NotSupportedException(SR.NotSupported_KeyAlgorithm); 418throw 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.OpenSsl.cs (6)
57SR.Cryptography_X509_PfxWithoutPassword_MaxAllowedIterationsExceeded, 126SR.Cryptography_X509_PfxWithoutPassword_MaxAllowedIterationsExceeded, 158SR.Cryptography_Unix_X509_MachineStoresReadOnly, 159new PlatformNotSupportedException(SR.Cryptography_Unix_X509_MachineStoresReadOnly)); 177SR.Cryptography_Unix_X509_MachineStoresRootOnly, 178new PlatformNotSupportedException(SR.Cryptography_Unix_X509_MachineStoresRootOnly));
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (4)
23throw new ArgumentOutOfRangeException(nameof(emailAddress), SR.Arg_EmptyOrNullString); 31throw new ArgumentOutOfRangeException(nameof(dnsName), SR.Arg_EmptyOrNullString); 53throw new ArgumentOutOfRangeException(nameof(upn), SR.Arg_EmptyOrNullString); 97throw new CryptographicException(SR.Cryptography_Invalid_IA5String);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (2)
58throw new PlatformNotSupportedException(SR.Cryptography_Unix_X509_SerializedExport); 60throw new CryptographicException(SR.Cryptography_X509_InvalidContentType);
System\Security\Cryptography\X509Certificates\UnsupportedDisallowedStore.cs (3)
42throw new CryptographicException(SR.Cryptography_X509_StoreReadOnly); 46SR.Cryptography_Unix_X509_NoDisallowedStore, 47new PlatformNotSupportedException(SR.Cryptography_Unix_X509_NoDisallowedStore));
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\X500NameEncoder.cs (5)
412throw new CryptographicException(SR.Cryptography_Invalid_X500Name); 471throw new CryptographicException(SR.Cryptography_Invalid_X500Name); 522throw new CryptographicException(SR.Cryptography_Invalid_X500Name, e); 655throw new CryptographicException(SR.Cryptography_Invalid_IA5String); 659throw new CryptographicException(SR.Cryptography_Invalid_X500Name);
System\Security\Cryptography\X509Certificates\X500NameEncoder.ManagedDecode.cs (2)
145throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding, e); 179throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
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 (31)
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)); 854throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 860throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 865throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 873throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 955throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 961throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 966throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 977throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1050throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 1056throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 1061throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1069throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1291_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)), 1384_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)), 1441throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 1455throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 1465throw new CryptographicException(SR.Cryptography_X509_NoPemCertificate); 1622SR.Argument_InvalidHostnameOrIPAddress, 1639throw new CryptographicException(SR.Cryptography_X509_TooManySANs); 1814throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ae); 1821throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey); 1844throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey, ae); 1850throw 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.OpenSsl.cs (3)
22throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 42throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 119throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (8)
365throw new CryptographicException(SR.Cryptography_Pfx_BadKeyReference); 368throw new CryptographicException(SR.Cryptography_Pfx_BadPassword) 384SR.Cryptography_UnknownAlgorithmIdentifier, 392throw new CryptographicException(SR.Cryptography_Pfx_BadKeyReference); 580throw new CryptographicException(SR.Cryptography_NotValidPrivateKey, nse); 644throw new CryptographicException(SR.Cryptography_NotValidPrivateKey, nse); 667throw new CryptographicException(SR.Cryptography_NotValidPrivateKey, nse); 698throw new CryptographicException(SR.Cryptography_NotValidPrivateKey, nse);
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\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)
105SR.Cryptography_X509_SAN_UnknownIPAddressSize); 116throw 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);