Git Product home page Git Product logo

unsafe_encrypt's Introduction

unsafe_encrypt

I actually don't know how safe this thing is

how it works as a normal user:

run node encrypt.js
input the message

send the message to the receiver (after you have securely shared your two keys: messagekey.txt and signkey.txt)

the receiver runs node decrypt.js and gets the original message you entered

how you can use it as a dev:

install it npm install unsafe_encrypt

require it in your project via import "unsafe_encrypt"

functions

encrypt

example: let encrypted = encrypt(input)

output: a hex string

decrypt

example: let out = decrypt(input) where input is optional (default: "output.txt")
input can be a file name (has to have a "." in it to be detected), or a previously encrypted string

out: object containing the following
status: "success" or "error"
msg: the decrypted message, even if it failed
signature: the signature that is in the encrypted message, undefined if status is "success"
expected: the signature that is expected to be in the encrypted message, undefined if status is "success"

unsafe_encrypt's People

Contributors

code002lover avatar

Watchers

 avatar

unsafe_encrypt's Issues

Empty message causing an error

Category: Bug

Severity: low

Version: 1.0.0

reproduction steps

encrypt an empty string (""), and then attempt to decrypt it again,
you will find that it will error

Error:

{
status: 'error',
msg: '',
signature: 'undefined',
expected: undefined
}

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.