Crypto Prisma
    Preparing search index...

    Interface EncryptionConfig

    Configuration for the encryption middleware.

    const config: EncryptionConfig = {
    key: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    encryptedFields: [{ model: "User", fields: ["email", "phone"] }],
    algorithm: "xchacha20-poly1305",
    deterministicFields: ["email"],
    };
    interface EncryptionConfig {
        key: string;
        encryptedFields: FieldConfig[];
        algorithm?: "xchacha20-poly1305" | "aes-256-gcm";
        deterministicFields?: string[];
    }
    Index
    key: string

    Hex-encoded 256-bit encryption key.

    encryptedFields: FieldConfig[]

    Models and fields to encrypt.

    algorithm?: "xchacha20-poly1305" | "aes-256-gcm"

    Encryption algorithm. Default: "xchacha20-poly1305".

    deterministicFields?: string[]

    Whether to use deterministic encryption for searchable fields.