Skip to content
This repository was archived by the owner on Apr 18, 2022. It is now read-only.
This repository was archived by the owner on Apr 18, 2022. It is now read-only.

Add private/public key sign/verify method #6

@brandonros

Description

@brandonros

Nice repo! I'm hoping it'll solve my JWT/JWS signing performance woes in my package.

Would you happen to have an example on how to sign a JWT with RS256?

return new Promise((resolve, reject) => {
  jws.createSign({
    header: { typ: 'JWT', alg: algorithm },
    privateKey: jwtKey,
    payload: payload,
  })
  .once('done', resolve)
  .once('error', reject)
})

I have this from the popular jws package. Not sure how to recreate that using your crypto instead of node's crypto.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions