38 references to Error
Microsoft.AspNetCore.DataProtection (38)
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (3)
72throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(configuration.HashAlgorithm)); 106throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(EncryptionAlgorithm)); 110throw Error.Common_PropertyMustBeNonNegative(nameof(configuration.EncryptionAlgorithmKeySize));
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (2)
73throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(EncryptionAlgorithm)); 77throw Error.Common_PropertyMustBeNonNegative(nameof(configuration.EncryptionAlgorithmKeySize));
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (3)
63throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(configuration.ValidationAlgorithmType)); 87throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(configuration.EncryptionAlgorithmType)); 92throw Error.Common_PropertyMustBeNonNegative(nameof(configuration.EncryptionAlgorithmKeySize));
Cng\CbcAuthenticatedEncryptor.cs (2)
149throw Error.CryptCommon_PayloadInvalid(); 188throw Error.CryptCommon_PayloadInvalid();
Cng\CngGcmAuthenticatedEncryptor.cs (1)
122throw Error.CryptCommon_PayloadInvalid();
Cng\Internal\CngAuthenticatedEncryptorBase.cs (2)
38throw Error.CryptCommon_GenericError(ex); 79throw Error.CryptCommon_GenericError(ex);
DataProtectionBuilderExtensions.cs (1)
248throw Error.CertificateXmlEncryptor_CertificateNotFound(thumbprint);
KeyManagement\KeyRingBasedDataProtector.cs (7)
135throw Error.Common_EncryptionFailed(ex); 196throw Error.ProtectionProvider_BadMagicHeader(); 214throw Error.ProtectionProvider_BadMagicHeader(); 218throw Error.ProtectionProvider_BadVersion(); 244throw Error.Common_KeyNotFound(keyIdFromPayload); 272throw Error.Common_KeyRevoked(keyIdFromPayload); 288throw Error.DecryptionFailed(ex);
KeyManagement\KeyRingProvider.cs (2)
182throw Error.KeyRingProvider_DefaultKeyRevoked(defaultKey.KeyId); 426throw Error.KeyRingProvider_RefreshFailedOnOtherThread(existingTask.Exception);
KeyManagement\XmlKeyManager.cs (2)
203throw Error.XmlKeyManager_DuplicateKey(key.KeyId); 418throw Error.XmlKeyManager_DoesNotSupportKeyDeletion();
Managed\AesGcmAuthenticatedEncryptor.cs (3)
77throw Error.CryptCommon_PayloadInvalid(); 142throw Error.CryptCommon_GenericError(ex); 218throw Error.CryptCommon_GenericError(ex);
Managed\ManagedAuthenticatedEncryptor.cs (4)
167throw Error.CryptCommon_PayloadInvalid(); 239throw Error.CryptCommon_PayloadInvalid(); // integrity check failure 271throw Error.CryptCommon_GenericError(ex); 371throw Error.CryptCommon_GenericError(ex);
Secret.cs (4)
58throw Error.Common_ValueMustBeNonNegative(nameof(secretLength)); 169throw Error.Common_ValueMustBeNonNegative(nameof(numBytes)); 241throw Error.Common_BufferIncorrectlySized(nameof(buffer), actualSize: buffer.Count, expectedSize: Length); 270throw Error.Common_BufferIncorrectlySized(nameof(bufferLength), actualSize: bufferLength, expectedSize: Length);
XmlEncryption\CertificateResolver.cs (1)
28throw Error.Common_ArgumentCannotBeNullOrEmpty(nameof(thumbprint));
XmlEncryption\CertificateXmlEncryptor.cs (1)
110throw Error.CertificateXmlEncryptor_CertificateNotFound(thumbprint);