cryper

0.0.7 • Public • Published

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())

/cryper/

    Package Sidebar

    Install

    npm i cryper

    Weekly Downloads

    6

    Version

    0.0.7

    License

    ISC

    Unpacked Size

    3.16 kB

    Total Files

    4

    Last publish

    Collaborators

    • chen7david