Skip to content

Encryption

js
const db = await AingDB.open({
  path: './secure.adb',
  encryption: {
    enabled: true,
    algorithm: 'aes-256-gcm',       // or: 'chacha20-poly1305' | 'xchacha20-poly1305'
    kdf: 'scrypt',                  // or: 'argon2id'
    passphrase: process.env.AINGDB_PASS
  },
  audit: { enabled: true }
})

For scrypt, env knobs like AINGDB_SCRYPT_N, AINGDB_SCRYPT_R, AINGDB_SCRYPT_P, and AINGDB_SCRYPT_MAXMEM may be read to tune derivation.

Released under MIT License.