619 references to CryptographicException
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
356throw new CryptographicException("ASN1 corrupted data");
Microsoft.AspNetCore.Cryptography.Internal (5)
CryptoUtil.cs (1)
62throw new CryptographicException("Assertion failed: " + message);
SafeHandles\BCryptAlgorithmHandle.cs (1)
145throw new CryptographicException(message);
UnsafeNativeMethods.cs (3)
473throw new CryptographicException(message); 482throw new CryptographicException(message); 499throw new CryptographicException(message);
Microsoft.AspNetCore.DataProtection (5)
Error.cs (5)
37return new CryptographicException(message); 60return new CryptographicException(message); 66return new CryptographicException(message); 81return new CryptographicException(Resources.ProtectionProvider_BadMagicHeader); 86return new CryptographicException(Resources.ProtectionProvider_BadVersion);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
CryptoUtil.cs (1)
22throw new CryptographicException("Assertion failed: " + message);
Error.cs (1)
20return new CryptographicException(message);
Microsoft.AspNetCore.DataProtection.Extensions (2)
TimeLimitedDataProtector.cs (2)
77throw new CryptographicException(Resources.TimeLimitedDataProtector_PayloadInvalid); 87throw new CryptographicException(Resources.FormatTimeLimitedDataProtector_PayloadExpired(embeddedExpiration));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
356throw new CryptographicException("ASN1 corrupted data");
Microsoft.DotNet.SignCheckLibrary (3)
Verification\AuthentiCode.cs (2)
139throw new CryptographicException($"Invalid content type: {signedCms.ContentInfo.ContentType.Value}"); 179throw new CryptographicException($"Invalid number of signers: {signerCount}. Expected 1.");
Verification\AuthentiCodeVerifier.cs (1)
114throw new CryptographicException($"File '{path}' is too small to contain a valid security entry.");
System.Net.Quic (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
111: base(message)
System.Net.Security (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
111: base(message)
System.Security.Cryptography (332)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (5)
70throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 120throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 135throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 326throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (4)
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.ERR.cs (1)
111: base(message)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.DigestAlgs.cs (2)
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 (3)
129throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 241throw new CryptographicException(SR.Cryptography_EnginesNotSupported); 271throw new CryptographicException(SR.Cryptography_EnginesNotSupported);
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\Asn1\Pkcs12\PfxAsn.manual.cs (2)
49throw new CryptographicException( 55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (4)
16throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 28throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 37throw new CryptographicException( 53throw new CryptographicException(
src\libraries\Common\src\System\Security\Cryptography\AuthenticationTagMismatchException.cs (2)
16public AuthenticationTagMismatchException() : base(SR.Cryptography_AuthTagMismatch) 27public AuthenticationTagMismatchException(string? message) : base(message ?? SR.Cryptography_AuthTagMismatch)
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
63throw new CryptographicException(SR.Cryptography_Pkcs9_MultipleSigningTimeNotAllowed);
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (6)
25throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 39throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 105throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 130throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (2)
94throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 178throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (26)
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); 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); 551throw new CryptographicException( 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 (1)
167throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (1)
281throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (6)
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);
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (2)
112_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid)), 156throw new CryptographicException(
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 (4)
54throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 85throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 121throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 148throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
142throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 398throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 434throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (3)
131throw new CryptographicException(SR.Cryptography_OverlappingBuffers); 1189throw new CryptographicException(SR.Argument_KemInvalidEncapsulationKeyLength); 1673throw new CryptographicException(
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 (25)
79throw new CryptographicException( 142throw new CryptographicException( 242throw new CryptographicException( 274throw new CryptographicException( 517throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 524throw new CryptographicException( 573throw new CryptographicException( 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); 692throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 708throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 727throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 736throw new CryptographicException( 745throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 754_ => throw new CryptographicException( 765throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 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);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
95throw new CryptographicException(SR.Argument_InvalidOidValue); 112throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (3)
66throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 98throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 104throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
59throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 220throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 228throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 233throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
192throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 223throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (5)
27throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 34throw new CryptographicException( 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 (6)
180throw new CryptographicException(SR.Cryptography_RSA_DecryptWrongSize); 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 (6)
130throw new CryptographicException(SR.Cryptography_KeyTooSmall); 265throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 273throw new CryptographicException(SR.Cryptography_KeyTooSmall); 310throw new CryptographicException( 393throw new CryptographicException(SR.Cryptography_SignHash_WrongSize); 405throw new CryptographicException(SR.Cryptography_KeyTooSmall);
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (3)
1012throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1077throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 1723throw new CryptographicException(
src\libraries\Common\src\System\Security\Cryptography\SlhDsaAlgorithm.cs (1)
207throw new CryptographicException(
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
566throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoadLimitExceededException.cs (1)
20: base(SR.Format(SR.Cryptography_X509_PKCS12_LimitExceeded, propertyName))
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
674throw new CryptographicException(message)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (12)
81throw new CryptographicException(SR.Cryptography_Pfx_NoCertificates); 147throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 255throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 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); 546throw new CryptographicException( 554throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 563throw new CryptographicException( 871throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\AesImplementation.cs (1)
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\AsymmetricAlgorithm.cs (1)
35throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\CapiHelper.Unix.cs (1)
62_ => throw new CryptographicException(SR.Cryptography_InvalidOID),
System\Security\Cryptography\ChaCha20Poly1305.cs (1)
46throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\ConcurrencyBlock.cs (1)
19throw new CryptographicException(SR.Cryptography_ConcurrentUseNotSupported);
System\Security\Cryptography\CryptographicOperations.cs (1)
809throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\CryptographicUnexpectedOperationException.cs (3)
15: base(SR.Arg_CryptographyException) 20: base(message ?? SR.Arg_CryptographyException) 30: base(string.Format(CultureInfo.CurrentCulture, format, insert))
System\Security\Cryptography\DES.cs (2)
69throw new CryptographicException(SR.Cryptography_InvalidKeySize); 87throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\DesImplementation.cs (1)
237throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\DSA.Xml.cs (2)
22throw new CryptographicException( 67throw new CryptographicException(
System\Security\Cryptography\DSACryptoServiceProvider.Unix.cs (4)
135throw new CryptographicException(SR.Argument_InvalidValue); 167throw new CryptographicException(SR.Cryptography_InvalidKeySize); 233throw new CryptographicException(SR.Cryptography_CSP_NoPrivateKey); 235throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashSize, "SHA1", SHA1_HASHSIZE));
System\Security\Cryptography\ECCurve.cs (5)
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\ECDiffieHellmanOpenSsl.cs (1)
36throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\ECDsaOpenSsl.cs (1)
36throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\ECParameters.cs (1)
58throw new CryptographicException(SR.Cryptography_InvalidCurveKeyParameters);
System\Security\Cryptography\HashAlgorithmName.cs (1)
195throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashAlgorithmOid, oidValue));
System\Security\Cryptography\Helpers.cs (10)
44throw new CryptographicException(SR.Cryptography_MissingIV); 174throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 189throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 301throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 308throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 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));
System\Security\Cryptography\HMACCommon.cs (1)
101throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashAlgorithmId));
System\Security\Cryptography\MLDsaOpenSsl.OpenSsl.cs (1)
43throw new CryptographicException(SR.Cryptography_MLDsaInvalidAlgorithmHandle);
System\Security\Cryptography\MLKemOpenSsl.OpenSsl.cs (1)
49throw new CryptographicException(SR.Cryptography_KemInvalidAlgorithmHandle);
System\Security\Cryptography\Oid.cs (2)
46throw new CryptographicException(SR.Cryptography_Oid_InvalidName); 57throw new CryptographicException(SR.Cryptography_Oid_InvalidValue);
System\Security\Cryptography\PasswordDeriveBytes.cs (1)
263throw new CryptographicException(SR.Cryptography_PasswordDerivedBytes_TooManyBytes);
System\Security\Cryptography\PKCS1MaskGenerationMethod.cs (1)
33throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashNameValue));
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 (1)
87throw new CryptographicException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\RC2Implementation.cs (3)
188throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 199throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 205throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\Rfc2898DeriveBytes.cs (3)
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 (1)
348throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
System\Security\Cryptography\RijndaelImplementation.cs (1)
43throw new CryptographicException(SR.Cryptography_Rijndael_BlockSize);
System\Security\Cryptography\RijndaelManaged.cs (1)
39throw new CryptographicException(SR.Cryptography_Rijndael_BlockSize);
System\Security\Cryptography\RSA.cs (3)
80throw new CryptographicException(SR.Cryptography_InvalidKeySize); 1439throw new CryptographicException(SR.Argument_DestinationTooShort); 1458throw new CryptographicException(SR.Argument_DestinationTooShort);
System\Security\Cryptography\RSA.Xml.cs (1)
19throw new CryptographicException(
System\Security\Cryptography\RSACryptoServiceProvider.Unix.cs (6)
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\RSAOpenSsl.cs (1)
79throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\SlhDsaOpenSsl.OpenSsl.cs (1)
61throw new CryptographicException(SR.Cryptography_SlhDsaInvalidAlgorithmHandle);
System\Security\Cryptography\SymmetricAlgorithm.cs (14)
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); 531throw new CryptographicException(SR.Argument_DestinationTooShort); 651throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptEcbCore))); 781throw new CryptographicException(SR.Argument_DestinationTooShort); 938throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCbcCore))); 1132throw new CryptographicException(SR.Argument_DestinationTooShort); 1374throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCfbCore)));
System\Security\Cryptography\SymmetricPadding.cs (11)
21throw new CryptographicException(SR.Cryptography_PartialBlock); 32throw new CryptographicException(SR.Cryptography_UnknownPaddingMode); 45throw new CryptographicException(SR.Cryptography_PartialBlock); 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 (3)
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 (1)
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\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\TimeAsn.xml.cs (1)
107throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (8)
79throw new CryptographicException( 168throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 175throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 183throw new CryptographicException( 199throw new CryptographicException(SR.Cryptography_CertReq_SignatureVerificationFailed); 221throw new CryptographicException( 229throw new CryptographicException( 271throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (1)
317throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Load.cs (4)
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);
System\Security\Cryptography\X509Certificates\FindPal.cs (3)
155throw new CryptographicException(SR.Cryptography_X509_InvalidFindType); 167throw new CryptographicException(SR.Cryptography_X509_InvalidFindValue); 205throw new CryptographicException(SR.Cryptography_X509_InvalidFindValue);
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (9)
48throw new CryptographicException(SR.Arg_EmptyOrNullString); 59throw new CryptographicException(SR.Cryptography_X509_StoreNotFound); 116throw new CryptographicException(SR.Cryptography_X509_StoreReadOnly); 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))); 376throw new CryptographicException(SR.Format(SR.Cryptography_OwnerNotCurrentUser, path)); 383throw new CryptographicException(SR.Format(SR.Cryptography_InvalidDirectoryPermissions, path));
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\RSAPssX509SignatureGenerator.cs (1)
32throw new CryptographicException(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (1)
97throw new CryptographicException(SR.Cryptography_Invalid_IA5String);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (1)
60throw new CryptographicException(SR.Cryptography_X509_InvalidContentType);
System\Security\Cryptography\X509Certificates\UnsupportedDisallowedStore.cs (1)
42throw new CryptographicException(SR.Cryptography_X509_StoreReadOnly);
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\X500NameEncoder.cs (4)
412throw new CryptographicException(SR.Cryptography_Invalid_X500Name); 471throw new CryptographicException(SR.Cryptography_Invalid_X500Name); 655throw new CryptographicException(SR.Cryptography_Invalid_IA5String); 659throw new CryptographicException(SR.Cryptography_Invalid_X500Name);
System\Security\Cryptography\X509Certificates\X500NameEncoder.ManagedDecode.cs (1)
179throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (1)
474throw new CryptographicException(SR.Cryptography_X509_AKID_NoSKID);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (2)
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 (8)
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); 1639throw new CryptographicException(SR.Cryptography_X509_TooManySANs); 1821throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey); 1850throw new CryptographicException(SR.Cryptography_X509_NoOrMismatchedPemKey);
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (4)
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);
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 (3)
365throw new CryptographicException(SR.Cryptography_Pfx_BadKeyReference); 368throw new CryptographicException(SR.Cryptography_Pfx_BadPassword) 392throw new CryptographicException(SR.Cryptography_Pfx_BadKeyReference);
System\Security\Cryptography\X509Certificates\X509Chain.cs (3)
106throw new CryptographicException(SR.Cryptography_CustomTrustCertsInSystemMode); 112throw new CryptographicException(SR.Cryptography_InvalidTrustCertificate); 187throw new CryptographicException(SR.Cryptography_X509_ChainBuildingFailed);
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
90throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen); 131throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen); 169throw new CryptographicException(SR.Cryptography_X509_StoreNotOpen);
System\Security\Cryptography\X509Certificates\X509SubjectAlternativeNameExtension.cs (1)
104throw new CryptographicException(
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (1)
114throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System.Security.Cryptography.Cose (27)
System\Security\Cryptography\Cose\CoseHelpers.cs (3)
269_ => throw new CryptographicException(SR.Format(SR.Sign1AlgDoesNotMatchWithTheOnesSupportedByTypeOfKey, algorithm, typeof(ECDsa))) 280_ => throw new CryptographicException(SR.Format(SR.Sign1AlgDoesNotMatchWithTheOnesSupportedByTypeOfKey, algorithm, typeof(RSA))) 315throw new CryptographicException(SR.Sign1VerifyAlgIsRequired);
System\Security\Cryptography\Cose\CoseMessage.cs (16)
127throw new CryptographicException(SR.Format(SR.DecodeSign1IncorrectTag, tag)); 134throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMessageContainedTrailingData)); 143throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1ArrayLengthMustBeFour)); 154throw new CryptographicException(SR.Sign1SignHeaderDuplicateLabels); 212throw new CryptographicException(SR.Format(SR.DecodeMultiSignIncorrectTag, tag)); 219throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMessageContainedTrailingData)); 228throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMultiSignArrayLengthMustBeFour)); 239throw new CryptographicException(SR.Sign1SignHeaderDuplicateLabels); 278throw new CryptographicException(SR.Format(SR.CriticalHeaderMissing, labelName)); 285throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1EncodedProtectedMapIncorrect)); 303_ => throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1MapLabelWasIncorrect)) 325throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1PayloadWasIncorrect)); 348throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.MultiSignMessageMustCarryAtLeastOneSignature)); 362throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeCoseSignatureMustBeArrayOfThree)); 373throw new CryptographicException(SR.Sign1SignHeaderDuplicateLabels); 574_ => throw new CryptographicException(SR.CriticalHeadersLabelWasIncorrect)
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
581throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect); 675throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\CoseSignature.cs (2)
365throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect); 398throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\KnownCoseAlgorithms.cs (4)
30throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 35=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 38=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg))); 53_ => throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, algString))
System.Security.Cryptography.Pkcs (123)
Internal\Cryptography\Pal\AnyOS\ManagedPal.Asn.cs (1)
35throw new CryptographicException(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (4)
59throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 101throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 116throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 126throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
98throw new CryptographicException(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (1)
51exception = new CryptographicException(SR.Cryptography_Cms_Ktri_RSARequired);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Exceptions.cs (2)
13return new CryptographicException(SR.Cryptography_Cms_RecipientNotFound); 34return new CryptographicException(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (3)
47exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 169throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm); 189exception = new CryptographicException(SR.Cryptography_Cms_Signing_RequiresPrivateKey);
Internal\Cryptography\PkcsHelpers.cs (4)
347exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 360exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 368exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 377exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (7)
70throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 91throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 120throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 135throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 185throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 200throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 326throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
49throw new CryptographicException( 55throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (4)
16throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 28throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 37throw new CryptographicException( 53throw new CryptographicException(
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
63throw new CryptographicException(SR.Cryptography_Pkcs9_MultipleSigningTimeNotAllowed);
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (2)
112_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid)), 156throw new CryptographicException(
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
54throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 85throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 121throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey); 148throw new CryptographicException(SR.Cryptography_NotValidPublicOrPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
142throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 398throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 434throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (25)
79throw new CryptographicException( 142throw new CryptographicException( 242throw new CryptographicException( 274throw new CryptographicException( 517throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 524throw new CryptographicException( 573throw new CryptographicException( 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); 692throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 708throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 727throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 736throw new CryptographicException( 745throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 754_ => throw new CryptographicException( 765throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 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);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
95throw new CryptographicException(SR.Argument_InvalidOidValue); 112throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (3)
66throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 98throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 104throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
59throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 220throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 228throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 233throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
192throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 223throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\Pkcs\CmsRecipient.cs (2)
59throw new CryptographicException(SR.Format(SR.Cryptography_Cms_Invalid_Subject_Identifier_Type, recipientIdentifierType)); 83throw new CryptographicException(SR.Cryptography_Cms_Recipient_RSARequired_RSAPaddingModeSupplied);
System\Security\Cryptography\Pkcs\CmsSignature.DSA.cs (1)
60throw new CryptographicException(
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (1)
61throw new CryptographicException(
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (4)
62throw new CryptographicException( 196throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 301throw new CryptographicException(SR.Cryptography_Pkcs_PssParametersMissing); 308throw new CryptographicException(
System\Security\Cryptography\Pkcs\CmsSigner.cs (3)
193throw new CryptographicException(SR.Cryptography_Cms_Signing_RequiresPrivateKey); 336throw new CryptographicException(SR.Cryptography_Cms_CannotDetermineSignatureAlgorithm); 379throw new CryptographicException(SR.Cryptography_Cms_IncompleteCertChain);
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (7)
119throw new CryptographicException( 134throw new CryptographicException(SR.Cryptography_TimestampReq_BadResponse); 396throw new CryptographicException(SR.Cryptography_BadHashValue); 409throw new CryptographicException(SR.Cryptography_TimestampReq_BadResponse); 432throw new CryptographicException(SR.Cryptography_TimestampReq_BadNonce); 453throw new CryptographicException(SR.Cryptography_TimestampReq_NoCertFound); 468throw new CryptographicException(SR.Cryptography_TimestampReq_UnexpectedCertFound);
System\Security\Cryptography\Pkcs\Rfc3161TimestampTokenInfo.cs (2)
67throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); 291throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\Pkcs\SignedCms.cs (8)
230throw new CryptographicException(SR.Cryptography_Cms_InvalidMessageType); 310throw new CryptographicException(SR.Cryptography_Cms_Sign_Empty_Content); 319throw new CryptographicException(SR.Cryptography_Cms_Sign_No_Signature_First_Signer); 415throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 623throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 649throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 683throw new CryptographicException(SR.Cryptography_Cms_CertificateAlreadyInCollection); 732throw new CryptographicException(SR.Cryptography_Cms_NoCertificateFound);
System\Security\Cryptography\Pkcs\SignerInfo.cs (20)
112throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 130throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 138throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 174throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 243throw new CryptographicException(SR.Cryptography_Cms_NoAttributeFound); 295throw new CryptographicException(SR.Cryptography_Cms_NoCounterCounterSigner); 305throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 363throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 371throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 404throw new CryptographicException(SR.Cryptography_Cms_NoSignerAtIndex); 435throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 443throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 464throw new CryptographicException(SR.Cryptography_Cms_SignerNotFound); 475throw new CryptographicException(SR.Cryptography_Pkcs_InvalidSignatureParameters); 480throw new CryptographicException(SR.Cryptography_BadSignature); 642throw new CryptographicException(SR.Cryptography_BadHashValue); 649throw new CryptographicException(SR.Cryptography_BadHashValue); 684throw new CryptographicException(SR.Cryptography_Cms_MissingAuthenticatedAttribute); 712throw new CryptographicException(SR.Cryptography_BadSignature); 757throw new CryptographicException(SR.Cryptography_Cms_WrongKeyUsage);
System.Security.Cryptography.ProtectedData (2)
src\libraries\Common\src\System\Security\Cryptography\CryptoThrowHelper.Windows.cs (1)
29return new CryptographicException(message)
System\Security\Cryptography\ProtectedData.cs (1)
368throw new CryptographicException(SR.Cryptography_DpApi_ProfileMayNotBeLoaded);
System.Security.Cryptography.Xml (114)
System\Security\Cryptography\Xml\CipherData.cs (5)
45throw new CryptographicException(SR.Cryptography_Xml_CipherValueElementRequired); 61throw new CryptographicException(SR.Cryptography_Xml_CipherValueElementRequired); 91throw new CryptographicException(SR.Cryptography_Xml_CipherValueElementRequired); 111throw new CryptographicException(SR.Cryptography_Xml_CipherValueElementRequired); 121throw new CryptographicException(SR.Cryptography_Xml_CipherValueElementRequired);
System\Security\Cryptography\Xml\CipherReference.cs (2)
55throw new CryptographicException(SR.Cryptography_Xml_ReferenceTypeRequired); 77Uri = uri ?? throw new CryptographicException(SR.Cryptography_Xml_UriRequired);
System\Security\Cryptography\Xml\DSAKeyValue.cs (5)
155throw new CryptographicException(SR.Format(SR.WrongRootElement, KeyValueElementName, SignedXml.XmlDsigNamespaceUrl)); 165throw new CryptographicException(SR.Format(SR.MustContainChildElement, KeyValueElementName, DSAKeyValueElementName)); 170throw new CryptographicException(SR.Format(SR.ElementMissing, YElementName)); 176throw new CryptographicException(SR.Format(SR.ElementCombinationMissing, PElementName, QElementName)); 185throw new CryptographicException(SR.Format(SR.ElementCombinationMissing, SeedElementName, PgenCounterElementName));
System\Security\Cryptography\Xml\EncryptedData.cs (2)
42throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData); 102throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData);
System\Security\Cryptography\Xml\EncryptedKey.cs (2)
82throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData); 179throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData);
System\Security\Cryptography\Xml\EncryptedReference.cs (1)
91throw new CryptographicException(SR.Cryptography_Xml_ReferenceTypeRequired);
System\Security\Cryptography\Xml\EncryptedXml.cs (20)
200throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported); 210throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported); 221throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported); 228throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported); 253throw new CryptographicException(SR.Cryptography_Xml_MissingCipherData); 276throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 292throw new CryptographicException(SR.Cryptography_Xml_UriNotSupported); 369throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 374throw new CryptographicException(SR.Cryptography_Xml_MissingDecryptionKey); 379throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 417throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 441throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 488throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 493throw new CryptographicException(SR.Cryptography_Xml_MissingAlgorithm); 515throw new CryptographicException(SR.Cryptography_Xml_NotSupportedCryptographicTransform); 578throw new CryptographicException(SR.Cryptography_Xml_MissingEncryptionKey); 621throw new CryptographicException(SR.Cryptography_Xml_NotSupportedCryptographicTransform); 661throw new CryptographicException(SR.Cryptography_Xml_MissingDecryptionKey); 875throw new CryptographicException(SR.Cryptography_Xml_NotSupportedCryptographicTransform); 917throw new CryptographicException(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
System\Security\Cryptography\Xml\EncryptionProperty.cs (3)
24throw new CryptographicException(SR.Cryptography_Xml_InvalidEncryptionProperty); 49throw new CryptographicException(SR.Cryptography_Xml_InvalidEncryptionProperty); 84throw new CryptographicException(SR.Cryptography_Xml_InvalidEncryptionProperty);
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (2)
68throw new CryptographicException(SR.Cryptography_Partial_Chain); 89throw new CryptographicException(SR.Cryptography_Partial_Chain);
System\Security\Cryptography\Xml\Reference.cs (8)
187throw new CryptographicException(SR.Cryptography_Xml_DigestMethodRequired); 196throw new CryptographicException(SR.Cryptography_Xml_DigestValueRequired); 255throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 260throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 361throw new CryptographicException(SR.Cryptography_Xml_CreateHashAlgorithmFailed); 397throw new CryptographicException(SR.Format(SR.Cryptography_Xml_SelfReferenceRequiresContext, _uri)); 413throw new CryptographicException(SR.Format(SR.Cryptography_Xml_SelfReferenceRequiresContext, _uri)); 446throw new CryptographicException(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\RSAKeyValue.cs (2)
110throw new CryptographicException(SR.Format(SR.WrongRootElement, KeyValueElementName, SignedXml.XmlDsigNamespaceUrl)); 120throw new CryptographicException(SR.Format(SR.MustContainChildElement, KeyValueElementName, RSAKeyValueElementName));
System\Security\Cryptography\Xml\Signature.cs (2)
101throw new CryptographicException(SR.Cryptography_Xml_SignedInfoRequired); 107throw new CryptographicException(SR.Cryptography_Xml_SignatureValueRequired);
System\Security\Cryptography\Xml\SignedInfo.cs (3)
103throw new CryptographicException(SR.Format(SR.Cryptography_Xml_CreateTransformFailed, CanonicalizationMethod)); 177throw new CryptographicException(SR.Cryptography_Xml_SignatureMethodRequired); 194throw new CryptographicException(SR.Cryptography_Xml_ReferenceElementRequired);
System\Security\Cryptography\Xml\SignedXml.cs (18)
391throw new CryptographicException(SR.Cryptography_Xml_LoadKeyFailed); 407throw new CryptographicException(SR.Cryptography_Xml_CreatedKeyFailed); 414throw new CryptographicException(SR.Cryptography_Xml_SignatureDescriptionNotCreated); 417throw new CryptographicException(SR.Cryptography_Xml_CreateHashAlgorithmFailed); 435throw new CryptographicException(SR.Cryptography_Xml_SignatureMethodKeyMismatch); 444throw new CryptographicException(SR.Cryptography_Xml_InvalidSignatureLength); 446throw new CryptographicException(SR.Cryptography_Xml_InvalidSignatureLength2); 457_ => throw new CryptographicException(SR.Cryptography_Xml_SignatureMethodKeyMismatch), 473throw new CryptographicException(SR.Cryptography_Xml_KeyInfoRequired); 587throw new CryptographicException( 843throw new CryptographicException(SR.Cryptography_Xml_InvalidReference); 1016throw new CryptographicException(SR.Cryptography_Xml_SignatureDescriptionNotCreated); 1025throw new CryptographicException(SR.Cryptography_Xml_CreateHashAlgorithmFailed); 1053throw new CryptographicException(SR.Cryptography_Xml_InvalidSignatureLength); 1055throw new CryptographicException(SR.Cryptography_Xml_InvalidSignatureLength2); 1057throw new CryptographicException(SR.Cryptography_Xml_SignatureValueRequired); 1059throw new CryptographicException(SR.Cryptography_Xml_InvalidSignatureLength); 1095throw new CryptographicException(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\SymmetricKeyWrap.cs (6)
76throw new CryptographicException(SR.Cryptography_Xml_KW_BadKeySize); 108throw new CryptographicException(SR.Cryptography_Xml_BadWrappedKeySize); 126throw new CryptographicException(SR.Cryptography_Xml_KW_BadKeySize); 188throw new CryptographicException(SR.Cryptography_Xml_KW_BadKeySize); 210throw new CryptographicException(SR.Cryptography_Xml_BadWrappedKeySize); 241throw new CryptographicException(SR.Cryptography_Xml_BadWrappedKeySize);
System\Security\Cryptography\Xml\TransformChain.cs (6)
95throw new CryptographicException(SR.Cryptography_Xml_TransformIncorrectInputType); 111throw new CryptographicException(SR.Cryptography_Xml_TransformIncorrectInputType); 127throw new CryptographicException(SR.Cryptography_Xml_TransformIncorrectInputType); 130throw new CryptographicException(SR.Cryptography_Xml_TransformIncorrectInputType); 151throw new CryptographicException(SR.Cryptography_Xml_TransformIncorrectInputType); 190throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\Utils.cs (2)
321throw new CryptographicException(SR.Cryptography_Xml_InvalidReference); 340throw new CryptographicException(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (5)
89throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 101throw new CryptographicException(SR.Cryptography_Xml_UriRequired); 104throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 111throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 207throw new CryptographicException(SR.Cryptography_Xml_MissingDecryptionKey);
System\Security\Cryptography\Xml\XmlDsigC14NTransform.cs (1)
40throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlDsigEnvelopedSignatureTransform.cs (4)
50throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 87throw new CryptographicException(SR.Cryptography_Xml_EnvelopedSignatureRequiresContext); 98throw new CryptographicException(SR.Cryptography_Xml_EnvelopedSignatureRequiresContext); 117throw new CryptographicException(SR.Cryptography_Xml_EnvelopedSignatureRequiresContext);
System\Security\Cryptography\Xml\XmlDsigExcC14NTransform.cs (2)
61throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 68throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlDsigXPathTransform.cs (4)
39throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 56throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 77throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 83throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlDsigXsltTransform.cs (3)
52throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 63throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 72throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlLicenseTransform.cs (6)
85throw new CryptographicException(SR.Cryptography_Xml_XrmlUnableToDecryptGrant); 126throw new CryptographicException(SR.Cryptography_Xml_UnknownTransform); 133throw new CryptographicException(SR.Cryptography_Xml_XrmlMissingContext); 149throw new CryptographicException(SR.Cryptography_Xml_XrmlMissingIssuer); 157throw new CryptographicException(SR.Cryptography_Xml_XrmlMissingLicence); 177throw new CryptographicException(SR.Cryptography_Xml_XrmlMissingIRelDecryptor);