/// <reference types="node" />
/// <reference types="node" />
import crypto from 'crypto';
import { Encryption } from '@nangohq/utils';
import type { Config as ProviderConfig } from '../models/Provider';
import type { DBConfig } from '../models/Generic.js';
import type { DBEnvironment, DBEnvironmentVariable } from '@nangohq/types';
import type { Connection, StoredConnection } from '../models/Connection.js';
export declare const pbkdf2: (arg1: crypto.BinaryLike, arg2: crypto.BinaryLike, arg3: number, arg4: number, arg5: string) => Promise<Buffer>;
export declare const ENCRYPTION_KEY: string;
export declare class EncryptionManager extends Encryption {
    private keySalt;
    shouldEncrypt(): boolean;
    encryptEnvironment(environment: DBEnvironment): Promise<DBEnvironment>;
    decryptEnvironment<TEnv extends DBEnvironment | null>(environment: TEnv): TEnv;
    encryptConnection(connection: Omit<Connection, 'created_at' | 'updated_at' | 'end_user_id'>): Omit<StoredConnection, 'created_at' | 'updated_at' | 'end_user_id'>;
    decryptConnection(connection: StoredConnection | null): Connection | null;
    encryptEnvironmentVariables(environmentVariables: DBEnvironmentVariable[]): DBEnvironmentVariable[];
    decryptEnvironmentVariables(environmentVariables: DBEnvironmentVariable[] | null): DBEnvironmentVariable[] | null;
    encryptProviderConfig(config: ProviderConfig): ProviderConfig;
    decryptProviderConfig(config: ProviderConfig | null): ProviderConfig | null;
    private saveDbConfig;
    private hashEncryptionKey;
    /**
     * Determine the Database encryption status
     */
    encryptionStatus(dbConfig?: DBConfig): Promise<'disabled' | 'not_started' | 'require_rotation' | 'require_decryption' | 'done' | 'incomplete'>;
    encryptDatabaseIfNeeded(): Promise<void>;
    private encryptDatabase;
}
declare const _default: EncryptionManager;
export default _default;
