/crypto-session

[koa-crypto-session]

Primary LanguageJavaScript

License

crypto-session

Usage

const session = require('crypto-session')
const app = require('koa')()

session(app, {
  crypto_key: 'exiKdyF+IwRIXJDmtGIl4vWUz4i3eVSISpfZoeYc0s4='
})

Generate a new crypto_key (note, the length depends on your algorithm):

$ node
> crypto.randomBytes(32).toString('base64')

License

MIT