Giter Club home page Giter Club logo

nodejs-rsa-poc's Introduction

Node.js RSA Encrypt/Decrypt POC

Create RSA Key in PEM format (Requires ssh-keygen installed);

Run npm run gen-keys. Follow the prompts, and look for a private/public key pair named demo inside the key folder


Encrypt

To encrypt a string - run npm run env STRING_TO_ENCRYPT

This should output something like

XuRSbAv2ehbj6ZQHKOUpZlZp+n8DGRDVTmZEPiLbwyJol6f1EhFnN12h9p1LQLNjQLAyEszxxJ3F49+vtFWtZqeJoWM42XEVQBKPpNpQDJOxeryWNMpwOBewGQ+2Iczz4yN2/HiCZOg/G0dG2ocJufobt1Zr3L2YJLv3BkH4G9aeiXu3BoeqlJPBmnEKF+xZdAgYFrC5Es8QERQ/xzLBvl7YeBosLQIvkC1mIfgTtYwy8kWTBU3ymcj+kHSpRF8aMkfak4UXGP8oDhEIb4oXh7TrHEN4BvSQKwusiQFlY2+FzE/XCMGXGsnID5Pnw7rc8X5jXjqyEwnQSmZyzkXH/wdotV5CHF10BRhauJeCW/2UCUBP2kXUHAxNJOFpGtMvD/3ir8PwZb15vE7isYgSwubT1nt29FJkZeAnyJzn77P8Y+obp56py3dyLgGDlhHUX4t23ZnaHXsQdbpWC01oeLS5oPEtVWL3bJh8wetQSdjb+ycYiE12vI2CcNo4cEpI

Decrypt

To decrypt an encrypted string run npm run dec $ENCODED_STRING


Test

To the - first generate keys using npm run gen-keys and then run npm run test

nodejs-rsa-poc's People

Contributors

yaronuliel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.