791 references to CryptographicException
dotnet-sourcelink (1)
HashAlgorithmGuids.cs (1)
23
=> TryGetName(guid) ?? throw new
CryptographicException
("unknown HashAlgorithm " + guid);
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)
78
throw new
CryptographicException
(Resources.TimeLimitedDataProtector_PayloadInvalid);
88
throw new
CryptographicException
(Resources.FormatTimeLimitedDataProtector_PayloadExpired(embeddedExpiration));
Mono.Cecil (3)
Mono.Security.Cryptography\CryptoConvert.cs (3)
78
throw new
CryptographicException
("Invalid blob header");
185
throw new
CryptographicException
("Invalid blob header");
259
throw new
CryptographicException
("Unknown blob format.");
NuGet.Packaging (49)
Signing\DerEncoding\DerEncoder.cs (6)
449
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
451
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
453
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
469
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
789
throw new
CryptographicException
(SR.Cryptography_Invalid_IA5String);
1000
throw new
CryptographicException
(SR.Argument_InvalidOidValue);
Signing\DerEncoding\DerGeneralizedTime.cs (5)
27
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
32
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
56
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
62
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
92
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
Signing\DerEncoding\DerSequenceReader.cs (23)
68
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
95
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
101
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
139
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
160
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
207
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
246
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
251
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
277
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
406
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
448
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
506
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
526
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
535
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
543
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
556
throw new
CryptographicException
(
583
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
592
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
603
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
610
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
614
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
631
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
635
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
Signing\Timestamp\Accuracy.cs (4)
56
throw new
CryptographicException
(Strings.InvalidAsn1);
66
throw new
CryptographicException
(Strings.InvalidAsn1);
76
throw new
CryptographicException
(Strings.InvalidAsn1);
82
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Timestamp\Extension.cs (1)
53
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Timestamp\Extensions.cs (1)
46
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Timestamp\MessageImprint.cs (2)
45
throw new
CryptographicException
(Strings.InvalidAsn1);
50
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Timestamp\Rfc3161TimestampRequestNetstandard21Wrapper.cs (1)
63
throw new
CryptographicException
(
Signing\Timestamp\Rfc3161TimestampTokenInfoNetstandard21Wrapper.cs (1)
22
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Timestamp\Rfc3161TimestampTokenNetstandard21Wrapper.cs (1)
28
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Timestamp\TstInfo.cs (3)
89
throw new
CryptographicException
(Strings.InvalidAsn1);
141
throw new
CryptographicException
(Strings.InvalidAsn1);
147
throw new
CryptographicException
(Strings.InvalidAsn1);
Signing\Utility\AttributeUtility.cs (1)
339
throw new
CryptographicException
(string.Format(CultureInfo.CurrentCulture, Strings.MultipleAttributesDisallowed, oid));
System.Net.Quic (1)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
112
:
base
(message)
System.Net.Security (1)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
112
:
base
(message)
System.Security.Cryptography (424)
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\AesAEAD.cs (1)
12
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (1)
204
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (4)
15
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
27
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
37
throw new
CryptographicException
(
53
throw new
CryptographicException
(
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\CngPkcs8.cs (1)
235
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (11)
679
throw new
CryptographicException
(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa)));
684
throw new
CryptographicException
(SR.Argument_PublicKeyWrongSizeForAlgorithm);
877
throw new
CryptographicException
(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa)));
882
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
933
throw new
CryptographicException
(SR.Argument_PublicKeyWrongSizeForAlgorithm);
983
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
1552
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1557
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1677
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1682
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1821
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaImplementation.Windows.cs (3)
44
throw new
CryptographicException
(SR.Cryptography_NoPrivateKeyAvailable);
127
throw new
CryptographicException
(SR.Cryptography_NoPrivateKeyAvailable);
140
throw new
CryptographicException
(SR.Cryptography_NoPrivateKeyAvailable);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKem.cs (12)
194
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
411
throw new
CryptographicException
(SR.Argument_PublicKeyWrongSizeForAlgorithm);
489
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
581
throw new
CryptographicException
(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLKem)));
586
throw new
CryptographicException
(SR.Argument_PublicKeyWrongSizeForAlgorithm);
680
throw new
CryptographicException
(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLKem)));
685
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
1855
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1860
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1998
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
2003
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
2126
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
63
throw new
CryptographicException
(SR.Cryptography_Pkcs9_MultipleSigningTimeNotAllowed);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptoThrowHelper.Windows.cs (1)
29
return new
CryptographicException
(message)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSACng.ImportExport.cs (2)
432
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
437
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.ImportExport.cs (2)
298
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
305
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanCng.ImportExport.cs (1)
122
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDsaCng.ImportExport.cs (1)
162
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (4)
138
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid));
154
throw new
CryptographicException
(SR.Cryptography_HashLengthMismatch);
230
throw new
CryptographicException
(
272
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (1)
52
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
53
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
84
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
126
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
154
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
173
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
417
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
453
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (11)
322
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmOid));
327
throw new
CryptographicException
(SR.Format(
335
throw new
CryptographicException
(SR.Cryptography_HashLengthMismatch);
440
throw new
CryptographicException
(SR.Cryptography_HashLengthMismatch);
1372
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
2188
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
2197
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
2209
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
2226
throw new
CryptographicException
(SR.Cryptography_MLDsaPkcs8KeyMismatch);
2241
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
2248
throw new
CryptographicException
(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (6)
61
throw new
CryptographicException
(SR.Cryptography_ArgMLDsaRequiresMLDsaKey);
134
throw new
CryptographicException
(SR.Argument_PrivateSeedWrongSizeForAlgorithm);
141
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
179
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
192
throw new
CryptographicException
(SR.Argument_PrivateSeedWrongSizeForAlgorithm);
202
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.Windows.cs (4)
44
throw new
CryptographicException
(SR.Cryptography_NoPrivateKeyAvailable);
67
throw new
CryptographicException
(SR.Cryptography_NoPrivateKeyAvailable);
185
throw new
CryptographicException
(SR.Cryptography_NoPrivateKeyAvailable);
198
throw new
CryptographicException
(SR.Cryptography_PqcNoSeed);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
49
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (9)
127
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
1198
throw new
CryptographicException
(SR.Argument_KemInvalidEncapsulationKeyLength);
1702
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1711
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1723
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1740
throw new
CryptographicException
(SR.Cryptography_KemPkcs8KeyMismatch);
1755
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1829
throw new
CryptographicException
(SR.Cryptography_PqcNoSeed);
1837
throw new
CryptographicException
(SR.Cryptography_KemNoDecapsulationKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.Windows.cs (2)
34
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
44
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (6)
53
throw new
CryptographicException
(SR.Cryptography_ArgMLKemRequiresMLKemKey);
138
throw new
CryptographicException
(SR.Cryptography_KeyNotExtractable);
154
throw new
CryptographicException
(SR.Cryptography_KeyNotExtractable);
176
throw new
CryptographicException
(SR.Cryptography_KeyNotExtractable);
204
throw new
CryptographicException
(SR.Cryptography_KeyNotExtractable);
229
throw new
CryptographicException
(SR.Cryptography_KeyNotExtractable);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
49
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (25)
107
throw new
CryptographicException
(
170
throw new
CryptographicException
(
270
throw new
CryptographicException
(
302
throw new
CryptographicException
(
545
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
552
throw new
CryptographicException
(
604
throw new
CryptographicException
(
633
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
656
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
674
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
681
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
692
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
711
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
733
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
749
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
768
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
777
throw new
CryptographicException
(
786
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
795
_ => throw new
CryptographicException
(
806
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
857
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
864
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
869
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
908
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1137
throw new
CryptographicException
(SR.Argument_InvalidValue);
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
70
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
231
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
239
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
244
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (8)
45
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
52
throw new
CryptographicException
(
75
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
112
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
127
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
134
throw new
CryptographicException
(
157
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
192
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.ImportExport.cs (1)
87
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (5)
51
throw new
CryptographicException
(SR.Cryptography_SignHash_WrongSize);
73
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
94
throw new
CryptographicException
(SR.Cryptography_SignHash_WrongSize);
111
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
159
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
25
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.Pkcs1.cs (4)
27
throw new
CryptographicException
(
101
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
117
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
127
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (2)
1235
throw new
CryptographicException
(SR.Argument_PublicKeyWrongSizeForAlgorithm);
1297
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsaAlgorithm.cs (1)
262
throw new
CryptographicException
(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
566
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellman.cs (4)
1023
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1028
throw new
CryptographicException
(SR.Argument_PublicKeyWrongSizeForAlgorithm);
1590
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1599
throw new
CryptographicException
(SR.Argument_PrivateKeyWrongSizeForAlgorithm);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (2)
245
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
255
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanImplementation.Windows.cs (1)
276
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519WindowsHelpers.cs (2)
44
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
56
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoadLimitExceededException.cs (1)
20
:
base
(SR.Format(SR.Cryptography_X509_PKCS12_LimitExceeded, propertyName))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
674
throw new
CryptographicException
(message)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (12)
83
throw new
CryptographicException
(SR.Cryptography_Pfx_NoCertificates);
149
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
257
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
512
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
520
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
525
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
558
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
567
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
594
throw new
CryptographicException
(
602
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
612
throw new
CryptographicException
(
1186
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\Aes.cs (6)
143
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
268
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
331
throw new
CryptographicException
(SR.Cryptography_KeyWrap_DecryptFailed);
473
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
603
throw new
CryptographicException
(SR.Cryptography_OverlappingBuffers);
728
throw new
CryptographicException
(SR.Cryptography_KeyWrap_DecryptFailed);
System\Security\Cryptography\AesCng.Windows.cs (2)
302
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
330
throw new
CryptographicException
(SR.Cryptography_InvalidCipherMode);
System\Security\Cryptography\AesImplementation.cs (1)
303
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedback, CipherMode.CFB));
System\Security\Cryptography\AsymmetricAlgorithm.cs (1)
35
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\BasicSymmetricCipherLiteBCrypt.cs (1)
78
throw new
CryptographicException
(SR.Cryptography_UnexpectedTransformTruncation);
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (2)
48
_ => throw new
CryptographicException
(SR.Cryptography_InvalidCipherMode),
88
throw new
CryptographicException
(SR.Cryptography_UnexpectedTransformTruncation);
System\Security\Cryptography\CapiHelper.DSA.Windows.cs (1)
48
throw new
CryptographicException
(SR.Cryptography_InvalidDSASignatureSize);
System\Security\Cryptography\CapiHelper.Windows.cs (6)
540
throw new
CryptographicException
(SR.Cryptography_OpenInvalidHandle);
755
throw new
CryptographicException
(SR.Format(SR.Cryptography_CSP_WrongKeySpec, keyType));
836
throw new
CryptographicException
("Cryptography_OAEP_XPPlus_Only");
840
throw new
CryptographicException
("Cryptography_OAEPDecoding");
1039
throw new
CryptographicException
(SR.Cryptography_InvalidOID);
1284
throw new
CryptographicException
(SR.Cryptography_PasswordDerivedBytes_InvalidIV);
System\Security\Cryptography\ChaCha20Poly1305.cs (1)
46
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\CngHelpers.cs (12)
78
throw new
CryptographicException
(SR.Cryptography_KeyBlobParsingError);
82
throw new
CryptographicException
(SR.Cryptography_KeyBlobParsingError);
90
throw new
CryptographicException
(SR.Format(SR.Cryptography_CngKeyWrongAlgorithm, algorithmName, algorithm));
94
throw new
CryptographicException
(SR.Cryptography_KeyBlobParsingError);
99
throw new
CryptographicException
(SR.Cryptography_KeyBlobParsingError);
103
throw new
CryptographicException
(SR.Cryptography_KeyBlobParsingError);
115
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
128
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
141
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
160
throw new
CryptographicException
(SR.Cryptography_InvalidRsaParameters);
283
throw new
CryptographicException
(SR.Cryptography_NotValidPrivateKey);
293
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
System\Security\Cryptography\CngSymmetricAlgorithmCore.cs (6)
47
throw new
CryptographicException
(SR.Format(SR.Cryptography_CngKeyWrongAlgorithm, actualAlgorithm.Algorithm, algorithm));
62
throw new
CryptographicException
(
178
throw new
CryptographicException
(SR.Cryptography_MissingIV);
298
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedbackSizeInBits, CipherMode.CFB));
305
throw new
CryptographicException
(SR.Format(SR.Cryptography_CipherModeFeedbackNotSupported, feedbackSizeInBits, CipherMode.CFB));
321
throw new
CryptographicException
(
System\Security\Cryptography\ConcurrencyBlock.cs (1)
19
throw new
CryptographicException
(SR.Cryptography_ConcurrentUseNotSupported);
System\Security\Cryptography\CryptographicOperations.cs (1)
1134
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\CspKeyContainerInfo.Windows.cs (2)
211
throw new
CryptographicException
(SR.Cryptography_CSP_NotFound);
244
throw new
CryptographicException
(SR.Cryptography_CSP_NotFound);
System\Security\Cryptography\DES.cs (2)
69
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
87
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\DESCryptoServiceProvider.Windows.cs (1)
93
throw new
CryptographicException
(SR.Cryptography_InvalidIVSize);
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.Windows.cs (2)
485
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
490
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidHashSize, "SHA1", SHA1.HashSizeInBytes));
System\Security\Cryptography\EccKeyFormatHelper.cs (26)
108
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
120
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
127
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
133
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
175
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
182
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
189
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
195
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
223
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
239
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
253
throw new
CryptographicException
(SR.Cryptography_ECC_NamedCurvesOnly);
287
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
292
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
313
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
333
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
346
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
367
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
374
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
395
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
426
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
487
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
530
throw new
CryptographicException
(
641
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
692
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
705
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
714
throw new
CryptographicException
(SR.Cryptography_InvalidECCharacteristic2Curve);
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\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)
45
throw new
CryptographicException
(SR.Cryptography_MissingIV);
175
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
190
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
313
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
320
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
460
throw new
CryptographicException
(SR.Cryptography_HashAlgorithmNameNullOrEmpty);
463
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name));
473
throw new
CryptographicException
(SR.Cryptography_HashAlgorithmNameNullOrEmpty);
475
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name));
479
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.EncryptionAlgorithm));
System\Security\Cryptography\HKDF.Windows.cs (1)
167
throw new
CryptographicException
(SR.Format(message, s_maxCngKeyLengthInBytes));
System\Security\Cryptography\HMACCommon.cs (1)
101
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashAlgorithmId));
System\Security\Cryptography\KeyBlobHelpers.cs (2)
32
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
55
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
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\PasswordDeriveBytes.Windows.cs (4)
18
throw new
CryptographicException
(SR.Cryptography_InvalidKeySize);
22
throw new
CryptographicException
(SR.Cryptography_PasswordDerivedBytes_InvalidAlgorithm);
26
throw new
CryptographicException
(SR.Cryptography_PasswordDerivedBytes_InvalidAlgorithm);
29
throw new
CryptographicException
(SR.Cryptography_PasswordDerivedBytes_InvalidIV);
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.Windows.cs (1)
103
throw new
CryptographicException
(SR.Cryptography_InvalidIVSize);
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);
1398
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
1417
throw new
CryptographicException
(SR.Argument_DestinationTooShort);
System\Security\Cryptography\RSA.Xml.cs (1)
19
throw new
CryptographicException
(
System\Security\Cryptography\RSABCrypt.cs (8)
192
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
210
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
237
throw new
CryptographicException
(
255
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
274
throw new
CryptographicException
(SR.Cryptography_SignHash_WrongSize);
301
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
351
throw new
CryptographicException
(SR.Cryptography_UnsupportedPaddingMode);
439
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
System\Security\Cryptography\RSACryptoServiceProvider.Windows.cs (3)
462
throw new
CryptographicException
(SR.Cryptography_CSP_NoPrivateKey);
624
throw new
CryptographicException
(SR.Cryptography_RSA_DecryptWrongSize);
684
return new
CryptographicException
(SR.Cryptography_InvalidPaddingMode);
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\CertificationRequestInfoAsn.xml.cs (1)
239
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
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)
122
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
195
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidHandle, nameof(handle)));
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (9)
79
throw new
CryptographicException
(
163
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
170
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
178
throw new
CryptographicException
(
194
throw new
CryptographicException
(SR.Cryptography_CertReq_SignatureVerificationFailed);
214
throw new
CryptographicException
(
227
throw new
CryptographicException
(
237
throw new
CryptographicException
(SR.Cryptography_CertReq_Load_DuplicateExtensionRequests);
286
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 (5)
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);
289
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\RSAPssX509SignatureGenerator.cs (1)
32
throw new
CryptographicException
(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\X509Certificates\StorePal.Windows.cs (1)
98
throw new
CryptographicException
(SR.Cryptography_X509_StoreNotOpen);
System\Security\Cryptography\X509Certificates\StorePal.Windows.Export.cs (1)
87
throw new
CryptographicException
(SR.Cryptography_X509_InvalidContentType);
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (1)
115
throw new
CryptographicException
(SR.Cryptography_Invalid_IA5String);
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\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 (11)
1394
_ => throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)),
1482
_ => throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)),
1539
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
1553
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
1563
throw new
CryptographicException
(SR.Cryptography_X509_NoPemCertificate);
1737
throw new
CryptographicException
(SR.Cryptography_X509_TooManySANs);
1909
throw new
CryptographicException
(SR.Cryptography_X509_NoOrMismatchedPemKey);
1956
throw new
CryptographicException
(SR.Cryptography_X509_NoOrMismatchedPemKey);
2057
throw new
CryptographicException
(SR.Cryptography_X509_NoOrMismatchedPemKey);
2135
throw new
CryptographicException
(SR.Cryptography_X509_NoOrMismatchedPemKey);
2220
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.Windows.cs (1)
135
throw new
CryptographicException
(SR.Cryptography_Pfx_NoCertificates);
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)
132
throw new
CryptographicException
(
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (1)
114
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
System.Security.Cryptography.Cose (33)
System\Security\Cryptography\Cose\CoseHelpers.cs (3)
180
=> throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg));
183
=> throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg)));
193
throw new
CryptographicException
(SR.Sign1VerifyAlgIsRequired);
System\Security\Cryptography\Cose\CoseKey.cs (9)
78
_ => throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, untrustedAlgorithm))
91
_ => throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, untrustedAlgorithm))
102
_ => throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, untrustedAlgorithm))
106
=> key.Algorithm.Name == expected.Name ? new CoseKey(key) : throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, untrustedAlgorithm));
119
throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg));
144
throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg));
168
_ => throw new
CryptographicException
(SR.Format(SR.Sign1UnknownCoseAlgorithm, algString))
186
throw new
CryptographicException
(SR.Format(SR.Sign1UnsupportedKey, KeyType.ToString()));
211
throw new
CryptographicException
(SR.Format(SR.Sign1UnsupportedKey, KeyType.ToString()));
System\Security\Cryptography\Cose\CoseMessage.cs (17)
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));
312
_ => throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1MapLabelWasIncorrect))
348
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1PayloadWasIncorrect));
371
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.MultiSignMessageMustCarryAtLeastOneSignature));
385
throw new
CryptographicException
(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeCoseSignatureMustBeArrayOfThree));
396
throw new
CryptographicException
(SR.Sign1SignHeaderDuplicateLabels);
607
_ => throw new
CryptographicException
(SR.CriticalHeadersLabelWasIncorrect)
619
throw new
CryptographicException
(SR.CriticalHeadersMustBeArrayOfAtLeastOne);
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
1036
throw new
CryptographicException
(SR.Sign1VerifyAlgHeaderWasIncorrect);
1048
throw new
CryptographicException
(SR.Format(SR.Sign1VerifyAlgDoesNotMatchKeyAlgorithm, algorithm, key.Algorithm));
System\Security\Cryptography\Cose\CoseSignature.cs (2)
686
throw new
CryptographicException
(SR.Sign1VerifyAlgHeaderWasIncorrect);
698
throw new
CryptographicException
(SR.Format(SR.Sign1VerifyAlgDoesNotMatchKeyAlgorithm, algorithm, key.Algorithm));
System.Security.Cryptography.Pkcs (137)
Internal\Cryptography\Pal\AnyOS\ManagedPal.Asn.cs (1)
30
throw new
CryptographicException
(SR.Cryptography_Cms_InvalidMessageType);
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (4)
59
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
105
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
120
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
130
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
89
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\Pal\Windows\DecryptorPalWindows.Decrypt.cs (2)
35
exception = new
CryptographicException
(SR.Cryptography_Cms_Ktri_RSARequired);
246
return new
CryptographicException
(SR.Format(SR.Cryptography_Cms_Invalid_Originator_Identifier_Choice, originatorChoice));
Internal\Cryptography\Pal\Windows\HelpersWindows.cs (2)
215
throw new
CryptographicException
(SR.Format(SR.Cryptography_Cms_Invalid_Subject_Identifier_Type, certId.dwIdChoice));
237
throw new
CryptographicException
(SR.Format(SR.Cryptography_Cms_Invalid_Subject_Identifier_Type, subjectIdentifierType));
Internal\Cryptography\Pal\Windows\KeyAgreeRecipientInfoPalWindows.cs (1)
104
_ => throw new
CryptographicException
(SR.Format(SR.Cryptography_Cms_Invalid_Originator_Identifier_Choice, originatorChoice)),
Internal\Cryptography\Pal\Windows\PkcsPalWindows.Encrypt.cs (1)
73
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
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\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (1)
204
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.manual.cs (4)
15
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
27
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
37
throw new
CryptographicException
(
53
throw new
CryptographicException
(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
63
throw new
CryptographicException
(SR.Cryptography_Pkcs9_MultipleSigningTimeNotAllowed);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptoThrowHelper.Windows.cs (1)
29
return new
CryptographicException
(message)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (3)
138
throw new
CryptographicException
(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid));
230
throw new
CryptographicException
(
272
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
53
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
84
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
126
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
154
throw new
CryptographicException
(SR.Cryptography_NotValidPublicOrPrivateKey);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
173
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
417
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
453
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (25)
107
throw new
CryptographicException
(
170
throw new
CryptographicException
(
270
throw new
CryptographicException
(
302
throw new
CryptographicException
(
545
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
552
throw new
CryptographicException
(
604
throw new
CryptographicException
(
633
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
656
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
674
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
681
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
692
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
711
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
733
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
749
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
768
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
777
throw new
CryptographicException
(
786
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
795
_ => throw new
CryptographicException
(
806
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
857
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
864
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
869
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
908
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
1137
throw new
CryptographicException
(SR.Argument_InvalidValue);
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
70
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
231
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
239
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
244
throw new
CryptographicException
(SR.Cryptography_Der_Invalid_Encoding);
src\runtime\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)
58
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (1)
60
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSignature.MLDsa.cs (1)
49
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (4)
61
throw new
CryptographicException
(
206
throw new
CryptographicException
(SR.Cryptography_Pkcs_InvalidSignatureParameters);
311
throw new
CryptographicException
(SR.Cryptography_Pkcs_PssParametersMissing);
321
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSignature.SlhDsa.cs (1)
60
throw new
CryptographicException
(
System\Security\Cryptography\Pkcs\CmsSigner.cs (4)
238
throw new
CryptographicException
(SR.Cryptography_Cms_Signing_RequiresPrivateKey);
405
throw new
CryptographicException
(SR.Cryptography_Cms_CannotDetermineSignatureAlgorithm);
429
throw new
CryptographicException
(SR.Cryptography_Cms_CannotDetermineSignatureAlgorithm);
474
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)
221
throw new
CryptographicException
(SR.Cryptography_Cms_InvalidMessageType);
298
throw new
CryptographicException
(SR.Cryptography_Cms_Sign_Empty_Content);
307
throw new
CryptographicException
(SR.Cryptography_Cms_Sign_No_Signature_First_Signer);
403
throw new
CryptographicException
(SR.Cryptography_Cms_SignerNotFound);
610
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
636
throw new
CryptographicException
(SR.Cryptography_Cms_NoSignerAtIndex);
670
throw new
CryptographicException
(SR.Cryptography_Cms_CertificateAlreadyInCollection);
719
throw new
CryptographicException
(SR.Cryptography_Cms_NoCertificateFound);
System\Security\Cryptography\Pkcs\SignerInfo.cs (22)
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);
643
throw new
CryptographicException
(SR.Cryptography_BadHashValue);
650
throw new
CryptographicException
(SR.Cryptography_BadHashValue);
665
throw new
CryptographicException
(SR.Cryptography_Cms_MissingAuthenticatedAttribute);
731
throw new
CryptographicException
(SR.Cryptography_Cms_MissingAuthenticatedAttribute);
781
throw new
CryptographicException
(SR.Cryptography_Cms_MissingAuthenticatedAttribute);
859
throw new
CryptographicException
(SR.Cryptography_BadSignature);
904
throw new
CryptographicException
(SR.Cryptography_Cms_WrongKeyUsage);
System.Security.Cryptography.ProtectedData (2)
src\runtime\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 (122)
System\Security\Cryptography\Xml\CanonicalizationDispatcher.cs (2)
21
throw new
CryptographicException
(SR.Cryptography_Xml_MaxDepthExceeded);
58
throw new
CryptographicException
(SR.Cryptography_Xml_MaxDepthExceeded);
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)
45
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
110
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
System\Security\Cryptography\Xml\EncryptedKey.cs (2)
81
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
183
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
System\Security\Cryptography\Xml\EncryptedReference.cs (1)
90
throw new
CryptographicException
(SR.Cryptography_Xml_ReferenceTypeRequired);
System\Security\Cryptography\Xml\EncryptedType.cs (1)
85
throw new
CryptographicException
(SR.Cryptography_Xml_MaxDepthExceeded);
System\Security\Cryptography\Xml\EncryptedXml.cs (22)
215
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
225
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
229
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
241
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
248
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
252
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
278
throw new
CryptographicException
(SR.Cryptography_Xml_MissingCipherData);
301
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
317
throw new
CryptographicException
(SR.Cryptography_Xml_UriNotSupported);
394
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
399
throw new
CryptographicException
(SR.Cryptography_Xml_MissingDecryptionKey);
404
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
442
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
466
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
513
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
518
throw new
CryptographicException
(SR.Cryptography_Xml_MissingAlgorithm);
540
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
603
throw new
CryptographicException
(SR.Cryptography_Xml_MissingEncryptionKey);
646
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
686
throw new
CryptographicException
(SR.Cryptography_Xml_MissingDecryptionKey);
900
throw new
CryptographicException
(SR.Cryptography_Xml_NotSupportedCryptographicTransform);
942
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)
97
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
114
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
131
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
134
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
155
throw new
CryptographicException
(SR.Cryptography_Xml_TransformIncorrectInputType);
198
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
System\Security\Cryptography\Xml\Utils.cs (3)
321
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
333
throw new
CryptographicException
(SR.Cryptography_Xml_UriRequired);
343
throw new
CryptographicException
(SR.Cryptography_Xml_InvalidReference);
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (7)
90
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
102
throw new
CryptographicException
(SR.Cryptography_Xml_UriRequired);
105
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
112
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
208
throw new
CryptographicException
(SR.Cryptography_Xml_MissingDecryptionKey);
240
throw new
CryptographicException
(SR.Cryptography_Xml_MaxDecryptableDataElementsExceeded);
258
throw new
CryptographicException
(SR.Cryptography_Xml_MaxDepthExceeded);
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);
132
throw new
CryptographicException
(SR.Cryptography_Xml_UnknownTransform);
139
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingContext);
155
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingIssuer);
163
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingLicence);
183
throw new
CryptographicException
(SR.Cryptography_Xml_XrmlMissingIRelDecryptor);
System.ServiceModel.Primitives (3)
System\IdentityModel\Tokens\X509AsymmetricSecurityKey.cs (3)
211
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new
CryptographicException
(SRP.Format(SRP.UnsupportedAlgorithmForCryptoOperation,
261
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new
CryptographicException
(SRP.Format(SRP.UnsupportedAlgorithmForCryptoOperation,
336
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new
CryptographicException
(SRP.Format(SRP.UnsupportedAlgorithmForCryptoOperation,
System.Windows.Extensions (1)
System\Security\Cryptography\X509Certificates\X509Certificate2UI.cs (1)
50
throw new
CryptographicException
(SR.Format(SR.Cryptography_InvalidHandle, nameof(safeCertContext)));