176 references to SR
System.Security.Cryptography.Cose (176)
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 (5)
180=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, alg)); 183=> throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, BigInteger.MinusOne - new BigInteger(alg))); 193throw new CryptographicException(SR.Sign1VerifyAlgIsRequired);
System\Security\Cryptography\Cose\CoseKey.cs (29)
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())); 263throw new ArgumentException(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 (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)); 575throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 580throw new InvalidOperationException(SR.MultiSignMessageMustCarryAtLeastOneSignature); 609throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 671throw new InvalidOperationException(SR.ContentWasDetached); 724throw new InvalidOperationException(SR.ContentWasEmbedded); 757throw new InvalidOperationException(SR.ContentWasEmbedded); 833throw new InvalidOperationException(SR.ContentWasEmbedded);
System\Security\Cryptography\Cose\CoseSign1Message.cs (30)
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)); 391throw new InvalidOperationException(SR.ContentWasDetached); 434throw new InvalidOperationException(SR.ContentWasDetached); 477throw new InvalidOperationException(SR.ContentWasDetached); 519throw new InvalidOperationException(SR.ContentWasEmbedded); 600throw new InvalidOperationException(SR.ContentWasEmbedded); 643throw new InvalidOperationException(SR.ContentWasEmbedded); 693throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 698throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 703throw new InvalidOperationException(SR.ContentWasEmbedded); 755throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 760throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 765throw new InvalidOperationException(SR.ContentWasEmbedded); 779throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect); 784throw new CryptographicException(SR.Format(SR.Sign1UnknownCoseAlgorithm, nullableAlg)); 860throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 865throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 870throw new InvalidOperationException(SR.ContentWasEmbedded); 922throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 927throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 932throw new InvalidOperationException(SR.ContentWasEmbedded); 1006throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 1046throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\CoseSignature.cs (19)
106throw new InvalidOperationException(SR.ContentWasDetached); 149throw new InvalidOperationException(SR.ContentWasDetached); 189throw new InvalidOperationException(SR.ContentWasDetached); 235throw new InvalidOperationException(SR.ContentWasEmbedded); 316throw new InvalidOperationException(SR.ContentWasEmbedded); 360throw new InvalidOperationException(SR.ContentWasEmbedded); 411throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 416throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 421throw new InvalidOperationException(SR.ContentWasEmbedded); 473throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 478throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 483throw new InvalidOperationException(SR.ContentWasEmbedded); 534throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 539throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 544throw new InvalidOperationException(SR.ContentWasEmbedded); 598throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 603throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 608throw new InvalidOperationException(SR.ContentWasEmbedded); 683throw new CryptographicException(SR.Sign1VerifyAlgHeaderWasIncorrect);
System\Security\Cryptography\Cose\CoseSigner.cs (10)
76throw new ArgumentException(SR.CoseSignerRSAKeyNeedsPadding, nameof(key)); 79throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key)); 167throw new ArgumentException(SR.Sign1SignAlgMustBeProtected, "unprotectedHeaders"); 184exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyHashAlgorithmAndPadding, alg.Value, CoseKey.KeyType, HashAlgorithm.Name, RSASignaturePadding); 188exMsg = SR.Format(SR.Sign1UnknownCoseAlgorithm, alg.Value); 192exMsg = SR.Format(SR.Sign1SignCoseAlgorithmDoesNotMatchSpecifiedKeyAndHashAlgorithm, alg.Value, CoseKey.KeyType, HashAlgorithm.Name);