jwe-lite
isomorphic library to decode, sign, and verify JSON Web Signatures
Last updated a year ago by kevlened .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install jwe-lite 
SYNC missed versions from official npm registry.

jwe-lite

Install

npm install jwe-lite

Usage

const jwe = require('jwe-lite')

const decoded = jwe.decode('somejwe');
const {
  header,            // jose header
  key,               // encrypted key
  iv,                // initialization vector
  encryptedContent,  // UintArray of the encrypted content
  tag                // UintArray of the authentication tag
} = decoded;

jwe.encrypt(payload, jwk)
.then(jweToken => console.log(jweToken))

jwe.decrypt(jweToken, jwk)
.then(payload => console.log(payload))

Can it be smaller?

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

import { encrypt } from 'jwe-lite'

License

MIT

Current Tags

  • 0.0.1                                ...           latest (a year ago)

1 Versions

  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |