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-node

v1.0.0

Published

Simple node.js RSA encrypt

Downloads

12

Readme

rsa-node NPM version Dependency Status

Focus on one thing.

Simple node.js RSA encrypt.

Installation

$ npm install --save rsa-node

Usage

Create instance:

var rsa = new RsaNode(KEY, EXP);
  • KEY - EncryptKey
  • EXP - EncryptExp

Method:

  • encrypt() - Encrypt text.

Example

var RsaNode = require('../src/index');

const KEY =
  'D41F1B452440585C5D1F853C7CBCB2908CFF324B43A42D7D77D2BB28BD64E2D098079B477D23990E935386FF73CCF865E0D84CE64793306C4083EADECFE36BCC89873EC2BA37D6CA943CB03BA5B4369EE7E31C3539DEA67FF8BF4A5CEE64EB3FD0639E78044B12C7B1D07E86EB7BCF033F78947E0ADE5653B9A88B33AFEB53BD';
const EXP = 65537;

var rsa = new RsaNode(KEY, EXP);

var res = rsa.encrypt('20161218');
console.log(res);

// res
// b055bdfe07cd9384e0108316bf1cae1ce974b482f162b52d6c0a5220f4a399d63f70815487c73e9c1ae9894da6544eb9dd4bef907e169b02e86236b01e8f1b334661d08703e6d3a64ac876ee927bd42331e170bf47e5c73da802c07df7118e27cf6b4a6f99d17915799d6b4ebd6a136b4aed55cb4222a2812fabc8d67c8b03ff

Testing

$ npm test

License

MIT © jeneser