GOST crypto and JWT for security
npm install --save gost-kryptoken
import gost from 'gost-kryptoken'
const message = 'message to encrypt'
const secret = 'your-secret-key'
const expiry = 3600
const token = gost.sign(message, secret, expiry)
returns token
const message = 'message to encrypt'
const secret = 'your-secret-key'
const token = gost.dekrypt(token, secret)
returns decoded data
const message = 'message to encrypt'
const secret = 'your-secret-key'
const token = gost.verify(token, secret)
returns boolean valid=>true expired=>false
--Code updated by godofsoftwaret@gmail.com-MK-3794-{P}