cryper
v0.0.7
Published
Downloads
3
Readme
cryper
Getting Started
const JWT = require('jsonwebtoken')
const { Cryper } = require('cryper')
const cryper = new Cryper({
filepath: string,
options: {
algorithm: 'RS256',
expiresIn: '30m'
}
})
cryper.setKeys() // creates new pub and pri key in a folder in your project
const pubkey = cryper.pubkey()
const token = cryper.sign(payload)
const result = JWT.verify(accessToken, cryper.pubkey())