Nimble Pixie Merchant

    @wizteam/pem-jwk
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    pem-jwk

    convert between PEM and JWK key serialization formats

    Usage

    As a commandline tool:

    $ npm install -g pem-jwk
    $ openssl genrsa 2048 | pem-jwk > private.jwk
    $ pem-jwk private.jwk > private.pem

    Example

    var assert = require('assert')
    var fs = require('fs')
    var pem2jwk = require('pem-jwk').pem2jwk
    var jwk2pem = require('pem-jwk').jwk2pem
    
    var str = fs.readFileSync('./test/priv.pem', 'ascii')
    var jwk = pem2jwk(str)
    var pem = jwk2pem(jwk)
    assert.equal(pem, str)

    Keywords

    none

    Install

    npm i @wizteam/pem-jwk

    DownloadsWeekly Downloads

    12

    Version

    2.0.1

    License

    MPL-2.0

    Unpacked Size

    13.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • wizteam