import { DecryptCallbacks } from './index.js'; export default class InternalEncrypt { static encryptColumn(data: any): string | null; /** * Returns `existingCiphertext` when the current column key opens it to a * value whose JSON serialization equals `data`'s, the plaintext * `encryptColumn(data)` would encrypt, and otherwise `encryptColumn(data)`. * A value only the legacy key opens, ciphertext no key opens, and a * missing `existingCiphertext` all get fresh ciphertext. It never calls * `onLegacyKeyUsed`. */ static reuseOrEncryptColumn(data: any, existingCiphertext: unknown): string | null; /** * Decrypts `data` with the column keys, current then legacy. * `onLegacyKeyUsed` is passed to `Encrypt.decrypt`, so it is called only * when the legacy key opened the value. */ static decryptColumn(data: any, callbacks?: DecryptCallbacks): unknown; /** * Encrypts `data`, a column's ciphertext, again with the current column key * (see `Encrypt.reencrypt`), opening it with the current key or, failing * that, the legacy one. It does not call `onLegacyKeyUsed`. */ static reencryptColumn(data: any): string | null; /** * Whether `data` is ciphertext that the column keys (current, then legacy) * open to a value `decryptColumn` returns. A missing column encryption * config or key still throws, since that is a configuration error rather * than a property of `data`. */ static isDecryptableColumnCiphertext(data: string): boolean; private static doEncryption; private static doDecryption; }