Skip to content

Add legacy encryption driver for backward compatibility

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Jan 15:13
· 17 commits to 6.x since this release

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.