39 references to Format
System.Security.Cryptography.Cose (39)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (5)
264
throw new ArgumentException(SR.
Format
(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
290
throw new ArgumentException(SR.
Format
(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
304
throw new ArgumentException(SR.
Format
(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
311
throw new ArgumentException(SR.
Format
(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
328
throw 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));
111
throw new ArgumentException(SR.
Format
(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key));
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()));
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))
322
throw new ArgumentException(SR.
Format
(SR.Sign1UnknownCoseAlgorithm, algorithm.Name), "key");
System\Security\Cryptography\Cose\CoseMessage.cs (12)
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));
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));
278
throw new CryptographicException(SR.
Format
(SR.CriticalHeaderMissing, labelName));
285
throw new CryptographicException(SR.
Format
(SR.DecodeErrorWhileDecoding, SR.DecodeSign1EncodedProtectedMapIncorrect));
303
_ => throw new CryptographicException(SR.
Format
(SR.DecodeErrorWhileDecoding, SR.DecodeSign1MapLabelWasIncorrect))
325
throw new CryptographicException(SR.
Format
(SR.DecodeErrorWhileDecoding, SR.DecodeSign1PayloadWasIncorrect));
348
throw new CryptographicException(SR.
Format
(SR.DecodeErrorWhileDecoding, SR.MultiSignMessageMustCarryAtLeastOneSignature));
362
throw new CryptographicException(SR.
Format
(SR.DecodeErrorWhileDecoding, SR.DecodeCoseSignatureMustBeArrayOfThree));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (2)
428
throw new ArgumentException(SR.
Format
(SR.CriticalHeaderMissing, labelName), nameof(signer));
433
throw new ArgumentException(SR.
Format
(SR.CriticalHeaderMissing, labelName), nameof(protectedHeaders));
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
302
throw new ArgumentException(SR.
Format
(SR.CriticalHeaderMissing, labelName), nameof(signer));
784
throw new CryptographicException(SR.
Format
(SR.Sign1UnknownCoseAlgorithm, nullableAlg));
System\Security\Cryptography\Cose\CoseSigner.cs (2)
79
throw new ArgumentException(SR.
Format
(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key));
188
exMsg = SR.
Format
(SR.Sign1UnknownCoseAlgorithm, alg.Value);