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