Interface ClientEncryptionEncryptOptions

Options to provide when encrypting data.

interface ClientEncryptionEncryptOptions {
    algorithm:
        | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
        | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
        | "Indexed"
        | "Unindexed"
        | "Range"
        | "TextPreview";
    contentionFactor?: number | bigint;
    keyAltName?: string;
    keyId?: Binary;
    queryType?:
        | "equality"
        | "range"
        | "prefixPreview"
        | "suffixPreview"
        | "substringPreview";
    rangeOptions?: RangeOptions;
    textOptions?: TextQueryOptions;
}

Properties

algorithm:
    | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
    | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
    | "Indexed"
    | "Unindexed"
    | "Range"
    | "TextPreview"

The algorithm to use for encryption.

contentionFactor?: number | bigint

The contention factor.

keyAltName?: string

A unique string name corresponding to an already existing dataKey.

keyId?: Binary

The id of the Binary dataKey to use for encryption

queryType?:
    | "equality"
    | "range"
    | "prefixPreview"
    | "suffixPreview"
    | "substringPreview"

The query type.

rangeOptions?: RangeOptions

The index options for a Queryable Encryption field supporting "range" queries.

textOptions?: TextQueryOptions

Options for a Queryable Encryption field supporting text queries. Only valid when algorithm is TextPreview.

Public Technical Preview: textPreview is an experimental feature and may break at any time.