npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rsa-json

v0.2.1

Published

generate rsa keypairs as json blobs

Downloads

235

Readme

rsa-json

generate rsa keypairs as json blobs

browser support

build status

example

$ rsa-json
{
  "private": "-----BEGIN RSA PRIVATE KEY-----\nMIICagIBAAKBhADANhcuzGaa+qW/bCqEiPw5GzC+EKHFUgUonEejR2MkT938cmYP\ntKOYtvwhP4GfvnOMds63+Rx0SqGNa87z2V0RvYU7DFtB8cmqxgqIlpzv+J5qh+32\n7UpIwUSQYyOld+XKQcRHQFq7dwsb4bDcGErhbrD7olZzoAVkEK1CO0nIY9JlGQID\nAQABAoGEALws+HtPj3BQzS5f1ixU9CFwVkLtg4LrrrM4dQYMYKpvKpP456Seo79h\n/esLAnuC+BrfQbhpQQs0+X67uiuPdQdmGa8iPUhtpDSX5II3+9vjbJmpoehD5lAi\n0BD9pbgkpmPc9YnE6hUFoKWNU5CnFVh/5Eefn9Y1VZErEMIXaAjf0E7RAkIO5Dgx\n4n1X0q9XDp+WR+sO5YFZNE5H13KSDLjT5QFy20FPoCx20AY0yvweitNFBIi+1b8T\ne9DhZf8q55UKdf++860CQgzoT6Mn5RpOr5mb6uVttepHam+EsZWh1z++ayrjrj0N\nFKnJvqMqtfTk9Nc2VK76p4gi+bcbxylcZosnw8bMxpFEnQJCCrjRqUFNRHWi38jc\nqOTBXylqN6NMlbePe48DaTXjFCK/5KgMO8POJCbe3tLQCUqZduYJvOqSXCgHUIoL\nqsuJR6DFAkIDnwEIkt6xXLXi8F0b9IV+rn5rvtxbUEYk+fTy2WE+e3b6k0DKYece\nR0VxQyrK1EM/7CAGgOKE9glGrOc91KE4i/kCQgkmK6aMv60S5JqeAanzn9eNbdmA\nQrh75sHVwK8rSW/IbgE/uKpK0RCkYD5Fd+L+FUqsDWlrof2CJFxZwBzKNbRliw==\n-----END RSA PRIVATE KEY-----\n",
  "public": "-----BEGIN RSA PUBLIC KEY-----\nMIGMAoGEAMA2Fy7MZpr6pb9sKoSI/DkbML4QocVSBSicR6NHYyRP3fxyZg+0o5i2\n/CE/gZ++c4x2zrf5HHRKoY1rzvPZXRG9hTsMW0HxyarGCoiWnO/4nmqH7fbtSkjB\nRJBjI6V35cpBxEdAWrt3CxvhsNwYSuFusPuiVnOgBWQQrUI7Schj0mUZAgMBAAE=\n-----END RSA PUBLIC KEY-----\n"
}

usage

usage: rsa-json OPTIONS

  Generate a json blob with a new public and private key PEM in it.
  
  OPTIONS
  
    --bits=n    number of bits to use for the modulus

methods

var createKeys = require('rsa-json')

var pair = createKeys(opts={}, cb)

Create a new RSA keypair in cb(err, pair).

opts.bits sets the number of bits in the modulus.

var pair = createKeys.native(opts={})

Like createKeys() but uses keypair to synchronously return a RSA keypair calculated in pure JavaScript.

browsers

If you require rsa-json with browserify only createKeys.native is exported.

install

With npm, to get the library do:

npm install rsa-json

or to get the command-line tool, do:

npm install -g rsa-json

license

MIT