Member Junction
    Preparing search index...

    Represents the parsed components of an encrypted value string.

    Encrypted values follow the format: $ENC$<keyId>$<algorithm>$<iv>$<ciphertext>[$<authTag>]

    This structure allows the encryption engine to:

    1. Identify which key was used for encryption
    2. Determine the algorithm for decryption
    3. Extract the IV and ciphertext for the crypto operation
    4. Verify authenticity with the auth tag (for AEAD algorithms)
    const parts = engine.ParseEncryptedValue(encryptedValue);
    console.log(parts.keyId); // UUID of the encryption key
    console.log(parts.algorithm); // 'AES-256-GCM'
    interface EncryptedValueParts {
        algorithm: string;
        authTag?: string;
        ciphertext: string;
        iv: string;
        keyId: string;
        marker: string;
    }
    Index

    Properties

    algorithm: string

    The algorithm name used for encryption. Matches the Name field in the EncryptionAlgorithm entity.

    'AES-256-GCM', 'AES-256-CBC'
    
    authTag?: string

    Base64-encoded authentication tag for AEAD algorithms. Only present for algorithms like AES-GCM that provide authentication. Undefined for non-AEAD algorithms like AES-CBC.

    ciphertext: string

    Base64-encoded encrypted data.

    iv: string

    Base64-encoded initialization vector. Randomly generated for each encryption operation.

    keyId: string

    The UUID of the encryption key used. References the EncryptionKey entity in the database.

    marker: string

    The encryption marker prefix (always '$ENC$'). Used for quick detection of encrypted values.