39 references to Format
System.Security.Cryptography.Cose (39)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (5)
264throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 290throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 304throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 311throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 328throw new ArgumentException(SR.Format(SR.CoseHeaderMapArgumentCoseHeaderValueIncorrect, label.LabelName), nameof(value), ex);
System\Security\Cryptography\Cose\CoseHelpers.cs (2)
180=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 183=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg)));
System\Security\Cryptography\Cose\CoseKey.cs (14)
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)); 111throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key)); 119throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 144throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 168_ => throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, algString)) 186throw new CryptographicException(SR.Format(SR.Sign1UnsupportedKey, KeyType.ToString())); 211throw new CryptographicException(SR.Format(SR.Sign1UnsupportedKey, KeyType.ToString())); 279_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 290_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 301_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 322throw new ArgumentException(SR.Format(SR.Sign1UnknownCoseAlgorithm, algorithm.Name), "key");
System\Security\Cryptography\Cose\CoseMessage.cs (12)
127throw new CryptographicException(SR.Format(SR.DecodeSign1IncorrectTag, tag)); 134throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMessageContainedTrailingData)); 143throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1ArrayLengthMustBeFour)); 212throw new CryptographicException(SR.Format(SR.DecodeMultiSignIncorrectTag, tag)); 219throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMessageContainedTrailingData)); 228throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeMultiSignArrayLengthMustBeFour)); 278throw new CryptographicException(SR.Format(SR.CriticalHeaderMissing, labelName)); 285throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1EncodedProtectedMapIncorrect)); 303_ => throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1MapLabelWasIncorrect)) 325throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeSign1PayloadWasIncorrect)); 348throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.MultiSignMessageMustCarryAtLeastOneSignature)); 362throw new CryptographicException(SR.Format(SR.DecodeErrorWhileDecoding, SR.DecodeCoseSignatureMustBeArrayOfThree));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (2)
428throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 433throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(protectedHeaders));
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
302throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 784throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, nullableAlg));
System\Security\Cryptography\Cose\CoseSigner.cs (2)
79throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key)); 188exMsg = SR.Format(SR.Sign1UnknownCoseAlgorithm, alg.Value);