134 references to Format
System.Security.Cryptography (134)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (2)
35throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, oid)); 68throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString()));
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.DigestAlgs.cs (2)
97_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId)), 117throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (2)
308throw new ArgumentException(SR.Format(SR.Cryptography_IncorrectTagLength, tagSizeInBytes), nameof(tag)); 321throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(AesGcm)));
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (1)
50SR.Format(SR.Cryptography_UnknownHashAlgorithm, algorithmValue));
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (2)
1932throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa))); 1940throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(CompositeMLDsa)));
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.cs (2)
77throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, oid)); 99SR.Format(SR.Cryptography_CurveNotSupported, curve.CurveType.ToString()));
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (2)
36SR.Format(SR.Cryptography_CurveNotSupported, parameters.Curve.CurveType.ToString())); 279throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CurveNotSupported, oid));
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (4)
137throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashOid)); 212throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName), ex); 228SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, algorithmId)); 281throw new ArgumentException(SR.Format(SR.Argument_DestinationImprecise, expectedLength), paramName);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (3)
322throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmOid)); 2283SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, identifier.Algorithm)); 2299throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLDsa)));
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (7)
115SR.Format(SR.Argument_DestinationImprecise, Algorithm.CiphertextSizeInBytes), 122SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 212SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 295SR.Format(SR.Argument_DestinationImprecise, Algorithm.PrivateSeedSizeInBytes), 526SR.Format(SR.Argument_DestinationImprecise, Algorithm.DecapsulationKeySizeInBytes), 580SR.Format(SR.Argument_DestinationImprecise, Algorithm.EncapsulationKeySizeInBytes), 1703throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(MLKem)));
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (9)
81SR.Format( 144SR.Format( 244SR.Format( 276SR.Format( 526SR.Format( 575SR.Format(SR.Cryptography_AlgorithmNotSupported, algId)); 738SR.Format( 756SR.Format( 1107throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RC2)));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (3)
40throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "asnEncodedData.Oid"), nameof(asnEncodedData)); 43throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 45throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData));
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
311SR.Format(SR.Cryptography_Encryption_MessageTooLong, maxInput));
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (5)
137SR.Format(SR.Argument_DestinationImprecise, signatureSizeInBytes), 321SR.Format(SR.Argument_DestinationImprecise, Algorithm.SignatureSizeInBytes), 1082SR.Format(SR.Argument_DestinationImprecise, publicKeySizeInBytes), 1133SR.Format(SR.Argument_DestinationImprecise, privateKeySizeInBytes), 2004throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(SlhDsa)));
src\libraries\Common\src\System\Security\Cryptography\SlhDsaAlgorithm.cs (1)
263SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, algorithmId));
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
566throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoadLimitExceededException.cs (1)
20: base(SR.Format(SR.Cryptography_X509_PKCS12_LimitExceeded, propertyName))
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
593SR.Format( 610SR.Format(
System\Security\Cryptography\Aes.cs (1)
139SR.Format(SR.Argument_DestinationImprecise, requiredLength),
System\Security\Cryptography\AesCcm.cs (1)
97throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(AesCcm)));
System\Security\Cryptography\ChaCha20Poly1305.cs (1)
112throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(ChaCha20Poly1305)));
System\Security\Cryptography\CryptographicOperations.cs (4)
799throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 890throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 985throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 1096throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\CspKeyContainerInfo.NotSupported.cs (1)
27return new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspKeyContainerInfo)));
System\Security\Cryptography\CspParameters.cs (1)
43throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\DSACryptoServiceProvider.Unix.cs (3)
59throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 65throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 77get { throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspKeyContainerInfo))); }
System\Security\Cryptography\DSAOpenSsl.cs (1)
116throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(DSAOpenSsl)));
System\Security\Cryptography\DSASignatureFormat.cs (1)
47SR.Format(SR.Cryptography_UnknownSignatureFormat, signatureFormat));
System\Security\Cryptography\EccKeyFormatHelper.cs (1)
552SR.Format(SR.Cryptography_CurveNotSupported, ecParameters.Curve.CurveType.ToString()));
System\Security\Cryptography\ECCurve.cs (3)
81throw new ArgumentException(SR.Format(SR.Cryptography_InvalidCurveOid, value.Value)); 195throw new CryptographicException(SR.Format(SR.Cryptography_InvalidCurveOid, Oid?.Value)); 245throw new CryptographicException(SR.Format(SR.Cryptography_CurveNotSupported, CurveType.ToString()));
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (1)
89throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDiffieHellmanOpenSsl)));
System\Security\Cryptography\ECDsaOpenSsl.cs (1)
89throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(ECDsaOpenSsl)));
System\Security\Cryptography\HashAlgorithmName.cs (1)
195throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHashAlgorithmOid, oidValue));
System\Security\Cryptography\Helpers.cs (3)
432throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 444throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.HashAlgorithm.Name)); 448throw new CryptographicException(SR.Format(SR.Cryptography_UnknownAlgorithmIdentifier, exportParameters.EncryptionAlgorithm));
System\Security\Cryptography\HKDF.cs (7)
57throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 92throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 98throw new ArgumentOutOfRangeException(nameof(outputLength), SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength)); 126throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 131throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output)); 159throw new ArgumentOutOfRangeException(nameof(outputLength), SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength)); 185throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
System\Security\Cryptography\HMACCommon.cs (1)
101throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashAlgorithmId));
System\Security\Cryptography\HMACStatic.cs (3)
27throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 175throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 208throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash));
System\Security\Cryptography\IncrementalHash.cs (1)
477throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, ih.HashLengthInBytes), nameof(hash));
System\Security\Cryptography\PasswordDeriveBytes.NotSupported.cs (1)
13throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CryptDeriveKey)));
System\Security\Cryptography\PKCS1MaskGenerationMethod.cs (1)
33throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, _hashNameValue));
System\Security\Cryptography\RC2CryptoServiceProvider.Unix.cs (1)
118throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(UseSalt)));
System\Security\Cryptography\RC2Implementation.cs (2)
188throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB)); 199throw new CryptographicException(SR.Format(SR.Cryptography_CipherModeNotSupported, CipherMode.CFB));
System\Security\Cryptography\RC2Implementation.OpenSsl.cs (1)
55throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_AlgorithmNotSupported, nameof(RC2)));
System\Security\Cryptography\Rfc2898DeriveBytes.cs (1)
263throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (1)
348throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
System\Security\Cryptography\RSACryptoServiceProvider.Unix.cs (4)
32throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 36throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspParameters))); 40throw new PlatformNotSupportedException(SR.Format(SR.Cryptography_CAPI_Required, nameof(CspKeyContainerInfo))); 371throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\RSAOpenSsl.cs (1)
100throw new PlatformNotSupportedException(SR.Format(SR.PlatformNotSupported_CryptographyOpenSSLNotFound, nameof(RSAOpenSsl)));
System\Security\Cryptography\SymmetricAlgorithm.cs (3)
651throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptEcbCore))); 938throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCbcCore))); 1374throw new CryptographicException(SR.Format(SR.Cryptography_EncryptedIncorrectLength, nameof(TryEncryptCfbCore)));
System\Security\Cryptography\TripleDES.cs (1)
57throw new CryptographicException(SR.Format(SR.Cryptography_InvalidKey_Weak, "TripleDES"));
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (4)
530SR.Format(SR.Cryptography_CertReq_NullValueInCollection, nameof(OtherRequestAttributes))); 536SR.Format(SR.Cryptography_CertReq_MissingOidInCollection, nameof(OtherRequestAttributes))); 916SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm), 1073SR.Format(SR.Cryptography_CertReq_DuplicateExtension, extension.Oid.Value));
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (2)
80SR.Format(SR.Cryptography_NoPemOfLabel, PemLabels.Pkcs10CertificateRequest)); 365SR.Format(SR.Cryptography_UnknownKeyAlgorithm, algorithmIdentifier.Algorithm));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
215SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm),
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (1)
54SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (5)
216throw new CryptographicException(SR.Format(SR.Cryptography_InvalidFilePermissions, stream.Name)); 343throw new CryptographicException(SR.Format(SR.Security_InvalidValue, nameof(storeName))); 376throw new CryptographicException(SR.Format(SR.Cryptography_OwnerNotCurrentUser, path)); 383throw new CryptographicException(SR.Format(SR.Cryptography_InvalidDirectoryPermissions, path)); 397string msg = SR.Format(SR.Cryptography_Unix_X509_DisallowedStoreNotEmpty, storePath);
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (2)
410SR.Format(SR.Cryptography_Unix_X509_PropertyNotSettable, "Archived")); 420SR.Format(SR.Cryptography_Unix_X509_PropertyNotSettable, "FriendlyName"));
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (1)
80SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
58SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
System\Security\Cryptography\X509Certificates\X500DistinguishedName.cs (1)
103throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, "flag"));
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (1)
375throw new ArgumentException(SR.Format(SR.Argument_Asn1_InvalidStringContents, stringEncodingType), paramName);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
727throw new CryptographicException(SR.Format(SR.Cryptography_InvalidHandle, "m_safeCertContext")); // Keeping "m_safeCertContext" string for backward compat sake.
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (2)
1400_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)), 1488_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownKeyAlgorithm, keyAlgorithm)),
System\Security\Cryptography\X509Certificates\X509CertificateLoader.netcore.cs (1)
112SR.Format(SR.Cryptography_X509_InvalidFlagCombination, persistenceFlags),
System\Security\Cryptography\X509Certificates\X509ChainPolicy.cs (4)
62throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 76throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 90throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 104throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
40throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation))); 52_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeName))), 66throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation)));
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (1)
202throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, algorithm), nameof(algorithm));