Crypto TypeORM
    Preparing search index...

    Interface EncryptionConfig

    Configuration for column-level encryption.

    const config: EncryptionConfig = {
    key: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    algorithm: "xchacha20-poly1305",
    };
    interface EncryptionConfig {
        key: string;
        algorithm?: string;
        fields?: Map<string, string[]>;
    }
    Index
    key: string

    256-bit encryption key as a 64-character hex string or 32-byte Uint8Array. Used for XChaCha20-Poly1305 secretbox operations.

    algorithm?: string

    Algorithm identifier. Currently only "xchacha20-poly1305" is supported. Reserved for future algorithm additions.

    "xchacha20-poly1305"
    
    fields?: Map<string, string[]>

    Per-entity field mapping. Keys are entity names, values are arrays of property names that should be encrypted. Used by EncryptionSubscriber to know which fields to process automatically.

    fields: new Map([
    ["User", ["ssn", "email"]],
    ["Payment", ["cardNumber"]],
    ])