Gazebo_simulation-Frontend/node_modules/jws-lite
Riddhi Dave f4870cd530 simulator page updates 2020-12-22 09:59:14 -05:00
..
dist React files 2020-12-21 10:29:31 -05:00
typescript React files 2020-12-21 10:29:31 -05:00
LICENSE React files 2020-12-21 10:29:31 -05:00
README.md React files 2020-12-21 10:29:31 -05:00
package.json simulator page updates 2020-12-22 09:59:14 -05:00

README.md

jws-lite

Install

npm install jws-lite

Usage

const jws = require('jws-lite')

const decoded = jws.decode('someJWS');
const {
  header,         // jose header
  payload,        // payload as a binary string
  signedContent,  // UintArray of the signed content
  signature       // UintArray of the signature
} = decoded;

jws.sign(payload, jwk)
.then(jwsToken => console.log(jwsToken))

jws.verify(jwsToken, jwk)
.then(payload => console.log(payload))

Can it be smaller?

If you use ES6 imports with a bundler that supports tree-shaking, yes!

import { sign } from 'jws-lite'

License

MIT