Giter VIP home page Giter VIP logo

encdec's Introduction

encdec

Encrypt and Decrypt strings

___ (while technically different, I have a loose use of terms like encrypt-encode; I'm not pedantic, and aware that they are different; bear with me, please :-) )

Overview

How does it work

In its default mode, this tool will encrypt and decrypt any string you will pass as an argument.
With the `-f` parameter, you pass a source and destination filename, and it will AES-256 encode/decode the file.

String mode

Simple: `encdec {encode|decode} $STRING`
Where $STRING is the string to encode or decode. Note that the decoded string will be output to stdout.

File mode (requires the -f flag)

Also simple: `encdec {encode|decode} $FILENAME` You need to provide the full source pathname.

Private key

AES-256 needs a private key to encrypt and decrypt a file or string. There is a built-in key in the software that you can easily find browsing the source code.
I left it there for testing purposes, but for obvious security reasons, you should avoid using it.

If you want to use your own, the `-p` flag will prompt you eventually to provide your own key. You will need to safe-keep it somewhere, as there are no mechanisms to retreive it if lost. Also, note that the key _needs to be exactly 32bytes long_.

Build, Install

You can either build from source, or use the provided binary packages (Alpine, RedHat, Debian)

Source install

Once you've cloned the repo, go into the `src/` directory, and run `./upgrade_pkgs.sh` (about this, please note that package upgrades have not been tested beyond current versions, for obvious reasons).

After this step, you can run ./build.sh (providing an optional -o param with a target dir is available). This will build and copy the binary into /opt/bin

You might wish to strip the produced binary, as it still contains debugging code.

Binary packages

For now, I provide all the necessary scripts and files to build the RPM, DEB and APK packages, but all of these depend on my own build containers, which, for now, I do not provide. Maybe some other time, but not now as they depend way too heavily on my home architecture.

So, as an alternative, you can find the binary packages at https://github.com/jeanfrancoisgratton/encdec/releases

encdec's People

Contributors

jeanfrancoisgratton avatar

Watchers

Sebastien Descamps avatar Laurent T. avatar Guillaume Le Floch avatar Antoine Ceol 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.