Crypto TypeORM
    Preparing search index...

    Interface ColumnCodec

    Keys and read options resolved once from an EncryptionConfig.

    const codec = createColumnCodec({ key: process.env.KEY! });
    const sealed = sealColumn(codec, "User.ssn", "123-45-6789");
    interface ColumnCodec {
        legacyKey: string;
        encKey: string;
        allowPlaintextFallback: boolean;
        acceptLegacyCiphertext: boolean;
    }
    Index
    legacyKey: string

    Configured key, used only to read legacy ciphertexts.

    encKey: string

    HKDF subkey used to seal and open v2 values.

    allowPlaintextFallback: boolean

    Whether non-ciphertext values are returned as-is on read.

    acceptLegacyCiphertext: boolean

    Whether legacy (pre-v2) ciphertexts are accepted on read.