142 references to SR
System.Security.Cryptography.Cose (142)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (13)
241throw new InvalidOperationException(SR.CoseHeaderMapDecodedMapIsReadOnlyCannotSetValue); 264throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 290throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 297throw new ArgumentException(SR.CriticalHeadersMustBeArrayOfAtLeastOne, nameof(value)); 304throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 311throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 323throw new CborContentException(SR.CoseHeaderMapCborEncodedValueNotValid); 328throw new ArgumentException(SR.Format(SR.CoseHeaderMapArgumentCoseHeaderValueIncorrect, label.LabelName), nameof(value), ex);
System\Security\Cryptography\Cose\CoseHeaderValue.cs (13)
137throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 142throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 164throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 169throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 191throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 196throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 218throw new ArgumentException(SR.Argument_DestinationTooSmall, nameof(destination)); 223throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 228throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid));
System\Security\Cryptography\Cose\CoseHelpers.cs (7)
269_ => throw new CryptographicException(SR.Format(SR.Sign1AlgDoesNotMatchWithTheOnesSupportedByTypeOfKey, algorithm, typeof(ECDsa))) 280_ => throw new CryptographicException(SR.Format(SR.Sign1AlgDoesNotMatchWithTheOnesSupportedByTypeOfKey, algorithm, typeof(RSA))) 304_ => throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType()), nameof(key)) 315throw new CryptographicException(SR.Sign1VerifyAlgIsRequired);
System\Security\Cryptography\Cose\CoseMessage.cs (40)
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)); 154throw new CryptographicException(SR.Sign1SignHeaderDuplicateLabels); 167throw new CryptographicException(SR.DecodeErrorWhileDecodingSeeInnerEx, ex); 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)); 239throw new CryptographicException(SR.Sign1SignHeaderDuplicateLabels); 252throw new CryptographicException(SR.DecodeErrorWhileDecodingSeeInnerEx, ex); 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)); 373throw new CryptographicException(SR.Sign1SignHeaderDuplicateLabels); 574_ => throw new CryptographicException(SR.CriticalHeadersLabelWasIncorrect) 615throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (17)
190throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 193throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 260throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 263throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 418throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer)); 423throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels); 428throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 433throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(protectedHeaders)); 570throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 575throw new InvalidOperationException(SR.MultiSignMessageMustCarryAtLeastOneSignature); 604throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 666throw new InvalidOperationException(SR.ContentWasDetached); 719throw new InvalidOperationException(SR.ContentWasEmbedded); 752throw new InvalidOperationException(SR.ContentWasEmbedded); 825throw new InvalidOperationException(SR.ContentWasEmbedded);
System\Security\Cryptography\Cose\CoseSign1Message.cs (20)
159throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 162throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 210throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 213throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 297throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer)); 302throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 385throw new InvalidOperationException(SR.ContentWasDetached); 424throw new InvalidOperationException(SR.ContentWasDetached); 466throw new InvalidOperationException(SR.ContentWasEmbedded); 507throw new InvalidOperationException(SR.ContentWasEmbedded); 557throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 562throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 567throw new InvalidOperationException(SR.ContentWasEmbedded); 581throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect); 652throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 657throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 662throw new InvalidOperationException(SR.ContentWasEmbedded); 675throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect); 764throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels);
System\Security\Cryptography\Cose\CoseSignature.cs (12)
106throw new InvalidOperationException(SR.ContentWasDetached); 146throw new InvalidOperationException(SR.ContentWasDetached); 189throw new InvalidOperationException(SR.ContentWasEmbedded); 230throw new InvalidOperationException(SR.ContentWasEmbedded); 281throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 286throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 291throw new InvalidOperationException(SR.ContentWasEmbedded); 342throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 347throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 352throw new InvalidOperationException(SR.ContentWasEmbedded); 365throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect); 398throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\CoseSigner.cs (12)
70throw new ArgumentException(SR.CoseSignerRSAKeyNeedsPadding, nameof(key)); 144throw new ArgumentException(SR.Sign1SignAlgMustBeProtected, "unprotectedHeaders"); 160exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyHashAlgorithmAndPadding, alg.Value, _keyType, HashAlgorithm.Name, RSASignaturePadding); 164exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyAndHashAlgorithm, alg.Value, _keyType, HashAlgorithm.Name); 181_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithmName), "hashAlgorithm") 195_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithmName), "hashAlgorithm") 206_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithmName), "hashAlgorithm")
System\Security\Cryptography\Cose\KnownCoseAlgorithms.cs (8)
30throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 35=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 38=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg))); 53_ => throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, algString))