Code Monkey home page Code Monkey logo

soldai-test-encrypt's Introduction

soldai-test-encrypt

Environment variables

    # Private key
    PATH_PRIKEY = // Private key path. Ex: './'
    FILENAME_PRIKEY = // Private key file name. Ex: 'rsa_1024_priv.pem'

    # Public key
    PATH_PUBKEY = // Public key path. Ex: './'
    FILENAME_PUBKEY = // Public key file name. Ex: 'rsa_1024_pub.pem'

Configuration

  1. Install packages

     npm install
    
  2. Create the file '.env' and add the environmet variables

How to use

  1. Modify the 'originalValue' constant in the index.js file with the string that is going to be encrypted/decrypted

  2. Run the file 'index.js'

     node index.js
    

How to generate a private and public key

Private key

  • Within your terminal (Unix based OS) type the following.

      openssl genrsa -out rsa_1024_priv.pem 1024
    

Public key

  • You can then get the public key by executing the following command.

      openssl rsa -pubout -in rsa_1024_priv.pem -out rsa_1024_pub.pem
    

soldai-test-encrypt's People

Contributors

vchy715 avatar vchangsoldai avatar

Watchers

James Cloos avatar Mario Campos avatar Diego Campos Sobrino 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.