Class EncryptedFieldResult
- Namespace
- Excalibur.Data.ElasticSearch.Security
- Assembly
- Excalibur.Data.ElasticSearch.dll
Represents the result of a field encryption operation including encrypted data and metadata.
public sealed class EncryptedFieldResult
- Inheritance
-
EncryptedFieldResult
- Inherited Members
Remarks
Initializes a new instance of the EncryptedFieldResult class.
Constructors
EncryptedFieldResult(string, string, string, string?, string?, ElasticSearchDataClassification, string)
Represents the result of a field encryption operation including encrypted data and metadata.
public EncryptedFieldResult(string encryptedValue, string algorithm, string keyVersion, string? initializationVector = null, string? authenticationTag = null, ElasticSearchDataClassification classification = ElasticSearchDataClassification.Confidential, string formatVersion = "2")
Parameters
encryptedValuestringThe encrypted field value.
algorithmstringThe encryption algorithm used.
keyVersionstringThe version of the encryption key used.
initializationVectorstringThe initialization vector used for encryption.
authenticationTagstringThe authentication tag for integrity verification.
classificationElasticSearchDataClassificationThe data classification level of the original field.
formatVersionstringThe envelope format-version discriminator, distinct from the key version. Defaults to Excalibur.Data.ElasticSearch.Security.EncryptedFieldResult.CurrentFormatVersion.
Remarks
Initializes a new instance of the EncryptedFieldResult class.
Properties
Algorithm
Gets the encryption algorithm used for this field.
public string Algorithm { get; }
Property Value
- string
The name of the encryption algorithm.
AuthenticationTag
Gets the authentication tag for integrity verification.
public string? AuthenticationTag { get; }
Property Value
- string
The authentication tag as a Base64-encoded string, or null if not supported.
Classification
Gets the data classification level of the original field.
public ElasticSearchDataClassification Classification { get; }
Property Value
- ElasticSearchDataClassification
The sensitivity classification of the encrypted data.
EncryptedAt
Gets the timestamp when the field was encrypted.
public DateTimeOffset EncryptedAt { get; }
Property Value
- DateTimeOffset
The UTC timestamp of the encryption operation.
EncryptedValue
Gets the encrypted field value as a Base64-encoded string.
public string EncryptedValue { get; }
Property Value
- string
The encrypted data encoded as a Base64 string.
FormatVersion
Gets the envelope format-version discriminator for this encrypted field.
public string FormatVersion { get; }
Property Value
- string
The format-version identifier, distinct from KeyVersion. Decryption dispatches on this value and rejects any version it does not recognize, providing a safe forward-migration path for future envelope changes.
HasIntegrityProtection
Gets a value indicating whether this encrypted field includes integrity protection.
public bool HasIntegrityProtection { get; }
Property Value
- bool
True if the field has an authentication tag for integrity verification, false otherwise.
InitializationVector
Gets the initialization vector used for encryption.
public string? InitializationVector { get; }
Property Value
- string
The IV as a Base64-encoded string, or null if not applicable.
KeyVersion
Gets the version of the encryption key used.
public string KeyVersion { get; }
Property Value
- string
The key version identifier for key rotation support.