Needlessly Promiscuous, Modularize!
    Wondering what’s next for npm?Check out our public roadmap! »

    jwe-handler
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.2 • Public • Published

    simple JWE converter

    this module performs two basic tasks create and decrypt JWE tokens.

    the creation process also encodes the JWE as base64.

    requires a PEM formatted public cert or private key to encrypt or a PEM formatted private key to decrypt

    installation

    npm i jwe-handler

    usage

    create JWE

      try {
        generatedJwe = await createJWE( itemToEncrypt, jwaPem );
      } catch( err ) {
        logger.error( "error in generate JWE try block : ", err );
        throw err;
      }
    

    decrypt JWE

      try {
        localClientRecord = await decryptJWE( clientToken, jwaPem );
      } catch( err ) {
        console.log( "error trying the decrypt : ", err );
        throw err
      }
    

    author: bruno@hypermedia.tech

    hypermedia.tech

    Install

    npm i jwe-handler

    DownloadsWeekly Downloads

    26

    Version

    3.0.2

    License

    Apache-2.0

    Unpacked Size

    4.3 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar