Coder Social home page Coder Social logo

crypt's Introduction

crypt

crypt is a small app to encrypt and decrypt files with aes encryption. It is portable and works on OSX, Linux, and Windows along with any other OS that supports go.

A key can be specified with the --key flag or via stdin if --key is not specified. You may want to provide your key via stdin for encryption and decryption so that it is not saved in your bash history.

Examples

Encrypt the contents from STDIN to a file

> echo "hello world" | crypt -e --key test -i encrypted-text

Decrypt the contents from STDIN to STDOUT

> cat encrypted-text | crypt -d --key test -i -o
hello world

Encrypt a large tar file to a new file

> crypt -e docker-image.tar encrypted-image.xxx
please enter your key:
> secret
1.24 GB / 1.25 GB [=========================================================================] 99.70 % 58.72 MB/s
# test to see if I can read the file
> tar -tvf encrypted-image.xxx
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

Decrypt a large file back to the original contents

> crypt -d encrypted-image.xxx docker-image-unencrypted.tar
please enter your key:
> secret
1.24 GB / 1.25 GB [=========================================================================] 99.45 % 70.80 MB/s
# look at the tar headers
> tar -tvf docker-image-unencrypted.tar
drwxr-xr-x 0/0               0 2014-11-22 21:14 05c6d847812ccad7f327f12ec2404dd972fc64e65c6c8a996b402c8e3f990d7c/
-rw-r--r-- 0/0               3 2014-11-22 21:14 05c6d847812ccad7f327f12ec2404dd972fc64e65c6c8a996b402c8e3f990d7c/
VERSION
NAME:
   crypt - encrypt and decrypt files easily

USAGE:
   crypt [global options] command [command options] [arguments...]

VERSION:
   1

AUTHOR:
  @crosbymichael

COMMANDS:
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --key                key to use for the encryption algo
   --encrypt, -e        encrypt a file
   --decrypt, -d        decrypt a file
   --stdin, -i          accept input for STDIN
   --stdout, -o         return output to STDOUT
   --help, -h           show help
   --version, -v        print the version

TODO:

  • Keep it simple stupid

License - MIT

crypt's People

Contributors

crosbymichael 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.