Adds a new legacy encryption driver that maintains compatibility with the AdonisJS v6 encryption format.
Usage:
import { defineConfig, drivers } from '@adonisjs/core/encryption'
export default defineConfig({
default: 'legacy',
list: {
legacy: drivers.legacy({
keys: [env.get('APP_KEY')],
}),
},
})Migration path:
Use this driver to decrypt existing encrypted values from AdonisJS v6, then re-encrypt them with a modern driver (aes256gcm recommended) for improved security.