619 references to CryptographicException
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
356
throw new
CryptographicException
("ASN1 corrupted data");
Microsoft.AspNetCore.Cryptography.Internal (5)
CryptoUtil.cs (1)
62
throw new
CryptographicException
("Assertion failed: " + message);
SafeHandles\BCryptAlgorithmHandle.cs (1)
145
throw new
CryptographicException
(message);
UnsafeNativeMethods.cs (3)
473
throw new
CryptographicException
(message);
482
throw new
CryptographicException
(message);
499
throw new
CryptographicException
(message);
Microsoft.AspNetCore.DataProtection (5)
Error.cs (5)
37
return new
CryptographicException
(message);
60
return new
CryptographicException
(message);
66
return new
CryptographicException
(message);
81
return new
CryptographicException
(Resources.ProtectionProvider_BadMagicHeader);
86
return new
CryptographicException
(Resources.ProtectionProvider_BadVersion);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
CryptoUtil.cs (1)
22
throw new
CryptographicException
("Assertion failed: " + message);
Error.cs (1)
20
return new
CryptographicException
(message);
Microsoft.AspNetCore.DataProtection.Extensions (2)
TimeLimitedDataProtector.cs (2)
77
throw new
CryptographicException
(Resources.TimeLimitedDataProtector_PayloadInvalid);
87
throw new
CryptographicException
(Resources.FormatTimeLimitedDataProtector_PayloadExpired(embeddedExpiration));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
356
throw new
CryptographicException
("ASN1 corrupted data");
Microsoft.DotNet.SignCheckLibrary (3)
Verification\AuthentiCode.cs (2)
139
throw new
CryptographicException
($"Invalid content type: {signedCms.ContentInfo.ContentType.Value}");
179
throw new
CryptographicException
($"Invalid number of signers: {signerCount}. Expected 1.");
Verification\AuthentiCodeVerifier.cs (1)
114
throw 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)
70
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
91
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
120
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
135
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
326
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (4)
168
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
215
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
336
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
406
throw 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)
153
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
178
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (3)
129
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
241
throw new
CryptographicException
(SR.Cryptography_EnginesNotSupported);
271
throw new
CryptographicException
(SR.Cryptography_EnginesNotSupported);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.ExportKeyContents.cs (1)
29
throw new
CryptographicException
(SR.Cryptography_NotRetrievable);
src\libraries\Common\src\System\Security\Cryptography\AesAEAD.cs (1)
12
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
49
throw new
CryptographicException
(
55
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (4)
16
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
28
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
37
throw new
CryptographicException
(
53
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\AuthenticationTagMismatchException.cs (2)
16
public AuthenticationTagMismatchException() :
base
(SR.Cryptography_AuthTagMismatch)
27
public AuthenticationTagMismatchException(string? message) :
base
(message ?? SR.Cryptography_AuthTagMismatch)
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
63
throw new
CryptographicException
(SR.Cryptography_Pkcs9_MultipleSigningTimeNotAllowed);
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (6)
25
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
39
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
67
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
91
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
105
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
130
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (2)
94
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
178
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (26)
124
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
136
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
143
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
149
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
190
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
197
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
204
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
210
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
237
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
253
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
267
throw new
CryptographicException
(SR.Cryptography_ECC_NamedCurvesOnly);
301
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
306
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
327
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
347
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
360
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
381
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
388
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
409
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
440
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
499
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
551
throw new
CryptographicException
(
662
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
713
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
726
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
735
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (1)
113
throw new
CryptographicException
(SR.Cryptography_TlsRequires64ByteSeed);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (1)
167
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (1)
281
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (6)
82
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
101
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
168
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
176
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
239
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
255
throw 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)),
156
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (2)
31
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
66
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
54
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
85
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
121
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
148
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
142
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
398
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
434
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (3)
131
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
1189
throw new
CryptographicException
(SR.Argument_KemInvalidEncapsulationKeyLength);
1673
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
50
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (25)
79
throw new
CryptographicException
(
142
throw new
CryptographicException
(
242
throw new
CryptographicException
(
274
throw new
CryptographicException
(
517
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
524
throw new
CryptographicException
(
573
throw new
CryptographicException
(
602
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
622
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
637
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
644
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
654
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
673
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
692
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
708
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
727
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
736
throw new
CryptographicException
(
745
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
754
_ => throw new
CryptographicException
(
765
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
816
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
823
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
828
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
867
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1095
throw new
CryptographicException
(SR.Argument_InvalidValue);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
95
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
112
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (3)
66
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
98
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
104
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
59
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
220
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
228
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
233
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
192
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
223
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (5)
27
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
34
throw new
CryptographicException
(
262
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
278
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
288
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (6)
180
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
668
throw new
CryptographicException
(SR.Argument_InvalidValue);
671
throw new
CryptographicException
(SR.Argument_InvalidValue);
716
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
818
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
880
new
CryptographicException
(SR.Cryptography_InvalidPaddingMode);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (6)
130
throw new
CryptographicException
(SR.Cryptography_KeyTooSmall);
265
throw new
CryptographicException
(SR.Cryptography_SignHash_WrongSize);
273
throw new
CryptographicException
(SR.Cryptography_KeyTooSmall);
310
throw new
CryptographicException
(
393
throw new
CryptographicException
(SR.Cryptography_SignHash_WrongSize);
405
throw new
CryptographicException
(SR.Cryptography_KeyTooSmall);
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (3)
1012
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1077
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1723
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\SlhDsaAlgorithm.cs (1)
207
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
566
throw 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)
674
throw new
CryptographicException
(message)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (12)
81
throw new
CryptographicException
(SR.Cryptography_Pfx_NoCertificates);
147
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
255
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
466
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
474
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
479
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
512
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
521
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
546
throw new
CryptographicException
(
554
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
563
throw new
CryptographicException
(
871
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\AesImplementation.cs (1)
290
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\AesImplementation.OpenSsl.cs (1)
60
new
CryptographicException
(SR.Cryptography_InvalidKeySize)),
System\Security\Cryptography\AsymmetricAlgorithm.cs (1)
35
throw 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)
46
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\ConcurrencyBlock.cs (1)
19
throw new
CryptographicException
(SR.Cryptography_ConcurrentUseNotSupported);
System\Security\Cryptography\CryptographicOperations.cs (1)
809
throw 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)
69
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
87
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\DesImplementation.cs (1)
237
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\DSA.Xml.cs (2)
22
throw new
CryptographicException
(
67
throw new
CryptographicException
(
System\Security\Cryptography\DSACryptoServiceProvider.Unix.cs (4)
135
throw new
CryptographicException
(SR.Argument_InvalidValue);
167
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
233
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
235
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidHashSize, "SHA1", SHA1_HASHSIZE));
System\Security\Cryptography\ECCurve.cs (5)
189
throw new
CryptographicException
(SR.Cryptography_InvalidECNamedCurve);
195
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidCurveOid, Oid?.Value));
223
throw new
CryptographicException
(SR.Cryptography_InvalidECPrimeCurve);
236
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
245
throw new
CryptographicException
(SR.Format(SR.Cryptography_CurveNotSupported, CurveType.ToString()));
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (1)
36
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\ECDsaOpenSsl.cs (1)
36
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\ECParameters.cs (1)
58
throw new
CryptographicException
(SR.Cryptography_InvalidCurveKeyParameters);
System\Security\Cryptography\HashAlgorithmName.cs (1)
195
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidHashAlgorithmOid, oidValue));
System\Security\Cryptography\Helpers.cs (10)
44
throw new
CryptographicException
(SR.Cryptography_MissingIV);
174
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
189
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
301
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
308
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
429
throw new
CryptographicException
(SR.Cryptography_HashAlgorithmNameNullOrEmpty);
432
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name));
442
throw new
CryptographicException
(SR.Cryptography_HashAlgorithmNameNullOrEmpty);
444
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name));
448
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.EncryptionAlgorithm));
System\Security\Cryptography\HMACCommon.cs (1)
101
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashAlgorithmId));
System\Security\Cryptography\MLDsaOpenSsl.OpenSsl.cs (1)
43
throw new
CryptographicException
(SR.Cryptography_MLDsaInvalidAlgorithmHandle);
System\Security\Cryptography\MLKemOpenSsl.OpenSsl.cs (1)
49
throw new
CryptographicException
(SR.Cryptography_KemInvalidAlgorithmHandle);
System\Security\Cryptography\Oid.cs (2)
46
throw new
CryptographicException
(SR.Cryptography_Oid_InvalidName);
57
throw new
CryptographicException
(SR.Cryptography_Oid_InvalidValue);
System\Security\Cryptography\PasswordDeriveBytes.cs (1)
263
throw new
CryptographicException
(SR.Cryptography_PasswordDerivedBytes_TooManyBytes);
System\Security\Cryptography\PKCS1MaskGenerationMethod.cs (1)
33
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashNameValue));
System\Security\Cryptography\RC2.cs (4)
45
throw new
CryptographicException
(SR.Cryptography_RC2_EKSKS);
63
throw new
CryptographicException
(SR.Cryptography_RC2_EKSKS);
67
throw new
CryptographicException
(SR.Cryptography_RC2_EKS40);
73
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\RC2CryptoServiceProvider.Unix.cs (1)
87
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\RC2Implementation.cs (3)
188
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB));
199
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB));
205
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\Rfc2898DeriveBytes.cs (3)
251
throw new
CryptographicException
(SR.Cryptography_HashAlgorithmNameNullOrEmpty);
263
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
287
throw new
CryptographicException
(SR.Cryptography_ExceedKdfExtractLimit);
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (1)
348
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
System\Security\Cryptography\RijndaelImplementation.cs (1)
43
throw new
CryptographicException
(SR.Cryptography_Rijndael_BlockSize);
System\Security\Cryptography\RijndaelManaged.cs (1)
39
throw new
CryptographicException
(SR.Cryptography_Rijndael_BlockSize);
System\Security\Cryptography\RSA.cs (3)
80
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
1439
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1458
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
System\Security\Cryptography\RSA.Xml.cs (1)
19
throw new
CryptographicException
(
System\Security\Cryptography\RSACryptoServiceProvider.Unix.cs (6)
48
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
69
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
134
throw new
CryptographicException
(SR.Argument_InvalidValue);
261
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
337
return new
CryptographicException
(SR.Cryptography_InvalidPaddingMode);
372
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\RSAOpenSsl.cs (1)
79
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\SlhDsaOpenSsl.OpenSsl.cs (1)
61
throw new
CryptographicException
(SR.Cryptography_SlhDsaInvalidAlgorithmHandle);
System\Security\Cryptography\SymmetricAlgorithm.cs (14)
36
throw new
CryptographicException
(SR.Cryptography_InvalidFeedbackSize);
52
throw new
CryptographicException
(SR.Cryptography_InvalidBlockSize);
76
throw new
CryptographicException
(SR.Cryptography_InvalidIVSize);
97
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
115
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
150
throw new
CryptographicException
(SR.Cryptography_InvalidCipherMode);
166
throw new
CryptographicException
(SR.Cryptography_InvalidPaddingMode);
232
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
531
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
651
throw new
CryptographicException
(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptEcbCore)));
781
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
938
throw new
CryptographicException
(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCbcCore)));
1132
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1374
throw new
CryptographicException
(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCfbCore)));
System\Security\Cryptography\SymmetricPadding.cs (11)
21
throw new
CryptographicException
(SR.Cryptography_PartialBlock);
32
throw new
CryptographicException
(SR.Cryptography_UnknownPaddingMode);
45
throw new
CryptographicException
(SR.Cryptography_PartialBlock);
128
throw new
CryptographicException
(SR.Cryptography_UnknownPaddingMode);
146
throw new
CryptographicException
(SR.Cryptography_UnknownPaddingMode);
163
throw new
CryptographicException
(SR.Cryptography_InvalidPadding);
169
throw new
CryptographicException
(SR.Cryptography_InvalidPadding);
180
throw new
CryptographicException
(SR.Cryptography_InvalidPadding);
191
throw new
CryptographicException
(SR.Cryptography_InvalidPadding);
197
throw new
CryptographicException
(SR.Cryptography_InvalidPadding);
210
throw new
CryptographicException
(SR.Cryptography_UnknownPaddingMode);
System\Security\Cryptography\TripleDES.cs (3)
57
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidKey_Weak, "TripleDES"));
66
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize); // .NET Framework compat: Strange exception for a null value, but this is what we threw in classic CLR.
69
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\TripleDesImplementation.cs (1)
234
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\UniversalCryptoDecryptor.cs (1)
72
throw new
CryptographicException
(SR.Cryptography_PartialBlock);
System\Security\Cryptography\UniversalCryptoOneShot.cs (2)
21
throw new
CryptographicException
(SR.Cryptography_PartialBlock);
29
throw new
CryptographicException
(SR.Cryptography_InvalidPadding);
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.manual.cs (2)
41
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
48
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (1)
107
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (8)
79
throw new
CryptographicException
(
168
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
175
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
183
throw new
CryptographicException
(
199
throw new
CryptographicException
(SR.Cryptography_CertReq_SignatureVerificationFailed);
221
throw new
CryptographicException
(
229
throw new
CryptographicException
(
271
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (1)
317
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Load.cs (4)
54
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
103
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
119
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
163
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\FindPal.cs (3)
155
throw new
CryptographicException
(SR.Cryptography_X509_InvalidFindType);
167
throw new
CryptographicException
(SR.Cryptography_X509_InvalidFindValue);
205
throw new
CryptographicException
(SR.Cryptography_X509_InvalidFindValue);
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (9)
48
throw new
CryptographicException
(SR.Arg_EmptyOrNullString);
59
throw new
CryptographicException
(SR.Cryptography_X509_StoreNotFound);
116
throw new
CryptographicException
(SR.Cryptography_X509_StoreReadOnly);
216
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidFilePermissions, stream.Name));
246
throw new
CryptographicException
(SR.Cryptography_X509_StoreReadOnly);
316
throw new
CryptographicException
(SR.Cryptography_X509_StoreNoFileAvailable);
343
throw new
CryptographicException
(SR.Format(SR.Security_InvalidValue, nameof(storeName)));
376
throw new
CryptographicException
(SR.Format(SR.Cryptography_OwnerNotCurrentUser, path));
383
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidDirectoryPermissions, path));
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (2)
30
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
67
throw new
CryptographicException
(SR.Cryptography_InvalidHandle);
System\Security\Cryptography\X509Certificates\OpenSslPkcsFormatReader.cs (1)
218
throw new
CryptographicException
(SR.Cryptography_X509_PKCS7_NoSigner);
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
32
throw new
CryptographicException
(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (1)
97
throw new
CryptographicException
(SR.Cryptography_Invalid_IA5String);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (1)
60
throw new
CryptographicException
(SR.Cryptography_X509_InvalidContentType);
System\Security\Cryptography\X509Certificates\UnsupportedDisallowedStore.cs (1)
42
throw new
CryptographicException
(SR.Cryptography_X509_StoreReadOnly);
System\Security\Cryptography\X509Certificates\X500DirectoryStringHelper.cs (4)
16
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
33
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
43
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
60
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (4)
412
throw new
CryptographicException
(SR.Cryptography_Invalid_X500Name);
471
throw new
CryptographicException
(SR.Cryptography_Invalid_X500Name);
655
throw new
CryptographicException
(SR.Cryptography_Invalid_IA5String);
659
throw new
CryptographicException
(SR.Cryptography_Invalid_X500Name);
System\Security\Cryptography\X509Certificates\X500NameEncoder.ManagedDecode.cs (1)
179
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (1)
474
throw new
CryptographicException
(SR.Cryptography_X509_AKID_NoSKID);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (2)
727
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidHandle, "m_safeCertContext")); // Keeping "m_safeCertContext" string for backward compat sake.
767
throw 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)),
1441
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
1455
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
1465
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
1639
throw new
CryptographicException
(SR.Cryptography_X509_TooManySANs);
1821
throw new
CryptographicException
(SR.Cryptography_X509_NoOrMismatchedPemKey);
1850
throw new
CryptographicException
(SR.Cryptography_X509_NoOrMismatchedPemKey);
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (4)
456
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
468
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
503
throw new
CryptographicException
(SR.Cryptography_X509_ExportFailed);
530
throw new
CryptographicException
(SR.Cryptography_X509_ExportFailed);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.OpenSsl.cs (3)
22
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
42
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
119
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (3)
365
throw new
CryptographicException
(SR.Cryptography_Pfx_BadKeyReference);
368
throw new
CryptographicException
(SR.Cryptography_Pfx_BadPassword)
392
throw new
CryptographicException
(SR.Cryptography_Pfx_BadKeyReference);
System\Security\Cryptography\X509Certificates\X509Chain.cs (3)
106
throw new
CryptographicException
(SR.Cryptography_CustomTrustCertsInSystemMode);
112
throw new
CryptographicException
(SR.Cryptography_InvalidTrustCertificate);
187
throw new
CryptographicException
(SR.Cryptography_X509_ChainBuildingFailed);
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
90
throw new
CryptographicException
(SR.Cryptography_X509_StoreNotOpen);
131
throw new
CryptographicException
(SR.Cryptography_X509_StoreNotOpen);
169
throw new
CryptographicException
(SR.Cryptography_X509_StoreNotOpen);
System\Security\Cryptography\X509Certificates\X509SubjectAlternativeNameExtension.cs (1)
104
throw new
CryptographicException
(
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (1)
114
throw 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)))
315
throw new
CryptographicException
(SR.Sign1VerifyAlgIsRequired);
System\Security\Cryptography\Cose\CoseMessage.cs (16)
127
throw new
CryptographicException
(SR.Format(SR.DecodeSign1IncorrectTag, tag));
134
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMessageContainedTrailingData));
143
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1ArrayLengthMustBeFour));
154
throw new
CryptographicException
(SR.Sign1SignHeaderDuplicateLabels);
212
throw new
CryptographicException
(SR.Format(SR.DecodeMultiSignIncorrectTag, tag));
219
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMessageContainedTrailingData));
228
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMultiSignArrayLengthMustBeFour));
239
throw new
CryptographicException
(SR.Sign1SignHeaderDuplicateLabels);
278
throw new
CryptographicException
(SR.Format(SR.CriticalHeaderMissing, labelName));
285
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1EncodedProtectedMapIncorrect));
303
_ => throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1MapLabelWasIncorrect))
325
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1PayloadWasIncorrect));
348
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.MultiSignMessageMustCarryAtLeastOneSignature));
362
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeCoseSignatureMustBeArrayOfThree));
373
throw new
CryptographicException
(SR.Sign1SignHeaderDuplicateLabels);
574
_ => throw new
CryptographicException
(SR.CriticalHeadersLabelWasIncorrect)
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
581
throw new
CryptographicException
(SR.Sign1VerifyAlgHeaderWasIncorrect);
675
throw new
CryptographicException
(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\CoseSignature.cs (2)
365
throw new
CryptographicException
(SR.Sign1VerifyAlgHeaderWasIncorrect);
398
throw new
CryptographicException
(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\KnownCoseAlgorithms.cs (4)
30
throw 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)
35
throw new
CryptographicException
(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (4)
59
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
101
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
116
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
126
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
98
throw new
CryptographicException
(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (1)
51
exception = new
CryptographicException
(SR.Cryptography_Cms_Ktri_RSARequired);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Exceptions.cs (2)
13
return new
CryptographicException
(SR.Cryptography_Cms_RecipientNotFound);
34
return new
CryptographicException
(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (3)
47
exception = new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
169
throw new
CryptographicException
(SR.Cryptography_Cms_UnknownAlgorithm);
189
exception = new
CryptographicException
(SR.Cryptography_Cms_Signing_RequiresPrivateKey);
Internal\Cryptography\PkcsHelpers.cs (4)
347
exception = new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
360
exception = new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
368
exception = new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
377
exception = new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (7)
70
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
91
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
120
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
135
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
185
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
200
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
326
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
49
throw new
CryptographicException
(
55
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (4)
16
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
28
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
37
throw new
CryptographicException
(
53
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
63
throw 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)),
156
throw new
CryptographicException
(
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
54
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
85
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
121
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
148
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
142
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
398
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
434
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (25)
79
throw new
CryptographicException
(
142
throw new
CryptographicException
(
242
throw new
CryptographicException
(
274
throw new
CryptographicException
(
517
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
524
throw new
CryptographicException
(
573
throw new
CryptographicException
(
602
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
622
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
637
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
644
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
654
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
673
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
692
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
708
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
727
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
736
throw new
CryptographicException
(
745
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
754
_ => throw new
CryptographicException
(
765
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
816
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
823
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
828
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
867
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1095
throw new
CryptographicException
(SR.Argument_InvalidValue);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
95
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
112
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (3)
66
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
98
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
104
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
59
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
220
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
228
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
233
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
192
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
223
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\Pkcs\CmsRecipient.cs (2)
59
throw new
CryptographicException
(SR.Format(SR.Cryptography_Cms_Invalid_Subject_Identifier_Type, recipientIdentifierType));
83
throw new
CryptographicException
(SR.Cryptography_Cms_Recipient_RSARequired_RSAPaddingModeSupplied);
System\Security\Cryptography\Pkcs\CmsSignature.DSA.cs (1)
60
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (1)
61
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (4)
62
throw new
CryptographicException
(
196
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
301
throw new
CryptographicException
(SR.Cryptography_Pkcs_PssParametersMissing);
308
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSigner.cs (3)
193
throw new
CryptographicException
(SR.Cryptography_Cms_Signing_RequiresPrivateKey);
336
throw new
CryptographicException
(SR.Cryptography_Cms_CannotDetermineSignatureAlgorithm);
379
throw new
CryptographicException
(SR.Cryptography_Cms_IncompleteCertChain);
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (7)
119
throw new
CryptographicException
(
134
throw new
CryptographicException
(SR.Cryptography_TimestampReq_BadResponse);
396
throw new
CryptographicException
(SR.Cryptography_BadHashValue);
409
throw new
CryptographicException
(SR.Cryptography_TimestampReq_BadResponse);
432
throw new
CryptographicException
(SR.Cryptography_TimestampReq_BadNonce);
453
throw new
CryptographicException
(SR.Cryptography_TimestampReq_NoCertFound);
468
throw new
CryptographicException
(SR.Cryptography_TimestampReq_UnexpectedCertFound);
System\Security\Cryptography\Pkcs\Rfc3161TimestampTokenInfo.cs (2)
67
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
291
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\Pkcs\SignedCms.cs (8)
230
throw new
CryptographicException
(SR.Cryptography_Cms_InvalidMessageType);
310
throw new
CryptographicException
(SR.Cryptography_Cms_Sign_Empty_Content);
319
throw new
CryptographicException
(SR.Cryptography_Cms_Sign_No_Signature_First_Signer);
415
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
623
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
649
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
683
throw new
CryptographicException
(SR.Cryptography_Cms_CertificateAlreadyInCollection);
732
throw new
CryptographicException
(SR.Cryptography_Cms_NoCertificateFound);
System\Security\Cryptography\Pkcs\SignerInfo.cs (20)
112
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
130
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
138
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
174
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
243
throw new
CryptographicException
(SR.Cryptography_Cms_NoAttributeFound);
295
throw new
CryptographicException
(SR.Cryptography_Cms_NoCounterCounterSigner);
305
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
363
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
371
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
404
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
435
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
443
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
464
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
475
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
480
throw new
CryptographicException
(SR.Cryptography_BadSignature);
642
throw new
CryptographicException
(SR.Cryptography_BadHashValue);
649
throw new
CryptographicException
(SR.Cryptography_BadHashValue);
684
throw new
CryptographicException
(SR.Cryptography_Cms_MissingAuthenticatedAttribute);
712
throw new
CryptographicException
(SR.Cryptography_BadSignature);
757
throw new
CryptographicException
(SR.Cryptography_Cms_WrongKeyUsage);
System.Security.Cryptography.ProtectedData (2)
src\libraries\Common\src\System\Security\Cryptography\CryptoThrowHelper.Windows.cs (1)
29
return new
CryptographicException
(message)
System\Security\Cryptography\ProtectedData.cs (1)
368
throw new
CryptographicException
(SR.Cryptography_DpApi_ProfileMayNotBeLoaded);
System.Security.Cryptography.Xml (114)
System\Security\Cryptography\Xml\CipherData.cs (5)
45
throw new
CryptographicException
(SR.Cryptography_Xml_CipherValueElementRequired);
61
throw new
CryptographicException
(SR.Cryptography_Xml_CipherValueElementRequired);
91
throw new
CryptographicException
(SR.Cryptography_Xml_CipherValueElementRequired);
111
throw new
CryptographicException
(SR.Cryptography_Xml_CipherValueElementRequired);
121
throw new
CryptographicException
(SR.Cryptography_Xml_CipherValueElementRequired);
System\Security\Cryptography\Xml\CipherReference.cs (2)
55
throw new
CryptographicException
(SR.Cryptography_Xml_ReferenceTypeRequired);
77
Uri = uri ?? throw new
CryptographicException
(SR.Cryptography_Xml_UriRequired);
System\Security\Cryptography\Xml\DSAKeyValue.cs (5)
155
throw new
CryptographicException
(SR.Format(SR.WrongRootElement, KeyValueElementName, SignedXml.XmlDsigNamespaceUrl));
165
throw new
CryptographicException
(SR.Format(SR.MustContainChildElement, KeyValueElementName, DSAKeyValueElementName));
170
throw new
CryptographicException
(SR.Format(SR.ElementMissing, YElementName));
176
throw new
CryptographicException
(SR.Format(SR.ElementCombinationMissing, PElementName, QElementName));
185
throw new
CryptographicException
(SR.Format(SR.ElementCombinationMissing, SeedElementName, PgenCounterElementName));
System\Security\Cryptography\Xml\EncryptedData.cs (2)
42
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
102
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
System\Security\Cryptography\Xml\EncryptedKey.cs (2)
82
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
179
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
System\Security\Cryptography\Xml\EncryptedReference.cs (1)
91
throw new
CryptographicException
(SR.Cryptography_Xml_ReferenceTypeRequired);
System\Security\Cryptography\Xml\EncryptedXml.cs (20)
200
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
210
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
221
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
228
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
253
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
276
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
292
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
369
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
374
throw new
CryptographicException
(SR.Cryptography_Xml_MissingDecryptionKey);
379
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
417
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
441
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
488
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
493
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
515
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
578
throw new
CryptographicException
(SR.Cryptography_Xml_MissingEncryptionKey);
621
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
661
throw new
CryptographicException
(SR.Cryptography_Xml_MissingDecryptionKey);
875
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
917
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
System\Security\Cryptography\Xml\EncryptionProperty.cs (3)
24
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidEncryptionProperty);
49
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidEncryptionProperty);
84
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidEncryptionProperty);
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (2)
68
throw new
CryptographicException
(SR.Cryptography_Partial_Chain);
89
throw new
CryptographicException
(SR.Cryptography_Partial_Chain);
System\Security\Cryptography\Xml\Reference.cs (8)
187
throw new
CryptographicException
(SR.Cryptography_Xml_DigestMethodRequired);
196
throw new
CryptographicException
(SR.Cryptography_Xml_DigestValueRequired);
255
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
260
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
361
throw new
CryptographicException
(SR.Cryptography_Xml_CreateHashAlgorithmFailed);
397
throw new
CryptographicException
(SR.Format(SR.Cryptography_Xml_SelfReferenceRequiresContext, _uri));
413
throw new
CryptographicException
(SR.Format(SR.Cryptography_Xml_SelfReferenceRequiresContext, _uri));
446
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\RSAKeyValue.cs (2)
110
throw new
CryptographicException
(SR.Format(SR.WrongRootElement, KeyValueElementName, SignedXml.XmlDsigNamespaceUrl));
120
throw new
CryptographicException
(SR.Format(SR.MustContainChildElement, KeyValueElementName, RSAKeyValueElementName));
System\Security\Cryptography\Xml\Signature.cs (2)
101
throw new
CryptographicException
(SR.Cryptography_Xml_SignedInfoRequired);
107
throw new
CryptographicException
(SR.Cryptography_Xml_SignatureValueRequired);
System\Security\Cryptography\Xml\SignedInfo.cs (3)
103
throw new
CryptographicException
(SR.Format(SR.Cryptography_Xml_CreateTransformFailed, CanonicalizationMethod));
177
throw new
CryptographicException
(SR.Cryptography_Xml_SignatureMethodRequired);
194
throw new
CryptographicException
(SR.Cryptography_Xml_ReferenceElementRequired);
System\Security\Cryptography\Xml\SignedXml.cs (18)
391
throw new
CryptographicException
(SR.Cryptography_Xml_LoadKeyFailed);
407
throw new
CryptographicException
(SR.Cryptography_Xml_CreatedKeyFailed);
414
throw new
CryptographicException
(SR.Cryptography_Xml_SignatureDescriptionNotCreated);
417
throw new
CryptographicException
(SR.Cryptography_Xml_CreateHashAlgorithmFailed);
435
throw new
CryptographicException
(SR.Cryptography_Xml_SignatureMethodKeyMismatch);
444
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidSignatureLength);
446
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidSignatureLength2);
457
_ => throw new
CryptographicException
(SR.Cryptography_Xml_SignatureMethodKeyMismatch),
473
throw new
CryptographicException
(SR.Cryptography_Xml_KeyInfoRequired);
587
throw new
CryptographicException
(
843
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
1016
throw new
CryptographicException
(SR.Cryptography_Xml_SignatureDescriptionNotCreated);
1025
throw new
CryptographicException
(SR.Cryptography_Xml_CreateHashAlgorithmFailed);
1053
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidSignatureLength);
1055
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidSignatureLength2);
1057
throw new
CryptographicException
(SR.Cryptography_Xml_SignatureValueRequired);
1059
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidSignatureLength);
1095
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\SymmetricKeyWrap.cs (6)
76
throw new
CryptographicException
(SR.Cryptography_Xml_KW_BadKeySize);
108
throw new
CryptographicException
(SR.Cryptography_Xml_BadWrappedKeySize);
126
throw new
CryptographicException
(SR.Cryptography_Xml_KW_BadKeySize);
188
throw new
CryptographicException
(SR.Cryptography_Xml_KW_BadKeySize);
210
throw new
CryptographicException
(SR.Cryptography_Xml_BadWrappedKeySize);
241
throw new
CryptographicException
(SR.Cryptography_Xml_BadWrappedKeySize);
System\Security\Cryptography\Xml\TransformChain.cs (6)
95
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
111
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
127
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
130
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
151
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
190
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\Utils.cs (2)
321
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
340
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (5)
89
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
101
throw new
CryptographicException
(SR.Cryptography_Xml_UriRequired);
104
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
111
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
207
throw new
CryptographicException
(SR.Cryptography_Xml_MissingDecryptionKey);
System\Security\Cryptography\Xml\XmlDsigC14NTransform.cs (1)
40
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlDsigEnvelopedSignatureTransform.cs (4)
50
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
87
throw new
CryptographicException
(SR.Cryptography_Xml_EnvelopedSignatureRequiresContext);
98
throw new
CryptographicException
(SR.Cryptography_Xml_EnvelopedSignatureRequiresContext);
117
throw new
CryptographicException
(SR.Cryptography_Xml_EnvelopedSignatureRequiresContext);
System\Security\Cryptography\Xml\XmlDsigExcC14NTransform.cs (2)
61
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
68
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlDsigXPathTransform.cs (4)
39
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
56
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
77
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
83
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlDsigXsltTransform.cs (3)
52
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
63
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
72
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\XmlLicenseTransform.cs (6)
85
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlUnableToDecryptGrant);
126
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
133
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingContext);
149
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingIssuer);
157
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingLicence);
177
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingIRelDecryptor);