Class ReEncryptionResult<T>
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Result of a single re-encryption operation with the entity.
public sealed class ReEncryptionResult<T> where T : class
Type Parameters
TThe entity type.
- Inheritance
-
ReEncryptionResult<T>
- Inherited Members
Properties
Duration
Gets the duration of the re-encryption operation.
public TimeSpan Duration { get; init; }
Property Value
Entity
Gets the entity (re-encrypted if successful, original if failed).
public required T Entity { get; init; }
Property Value
- T
ErrorMessage
Gets the error message if the operation failed.
public string? ErrorMessage { get; init; }
Property Value
Exception
Gets the exception if the operation failed.
public Exception? Exception { get; init; }
Property Value
FieldsReEncrypted
Gets the number of fields that were re-encrypted.
public int FieldsReEncrypted { get; init; }
Property Value
SourceProviderId
Gets the source provider ID that was used for decryption.
public string? SourceProviderId { get; init; }
Property Value
Success
Gets a value indicating whether the re-encryption succeeded.
public required bool Success { get; init; }
Property Value
TargetProviderId
Gets the target provider ID that was used for encryption.
public string? TargetProviderId { get; init; }
Property Value
Methods
Failed(T, string, Exception?)
Creates a failed result.
public static ReEncryptionResult<T> Failed(T entity, string errorMessage, Exception? exception = null)
Parameters
Returns
Succeeded(T, string, string, int, TimeSpan)
Creates a successful result.
public static ReEncryptionResult<T> Succeeded(T entity, string sourceProviderId, string targetProviderId, int fieldsReEncrypted, TimeSpan duration)