Skip to content
/ enc Public
forked from mimoo/eureka

Encrypt/decrypt files/directories

License

Notifications You must be signed in to change notification settings

pepa65/enc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enc

Encrypt/decrypt files/directories

Usage

enc - Encrypt/decrypt files/directories

Usage:  enc [-e|--encrypt] [-p|--password] [-h|--help] <path>

    -e/--encrypt:   To force encryption of an already encrypted archive.
                    Only enc-encrypted archives get decrypted (recognizable by
                    starting with 4 distinctive 'magic' bytes 0x01010101). They
                    get decrypted into a directory "enc_<random-suffix>".
                    The default operation is encryption, resulting in an
                    enc-encrypted compressed archive, ending with ".enc".
    -p|--password:  Instead of encrypting with a randomly generated 32 byte
                    hexadecimal password, the user is prompted for a password.
    -h|--help:      Only show this help text, nothing else

Examples

Making a compressed encrypted archive with a 32 byte hexadecimal password out of file, resulting in file.enc: enc file

Making a compressed encrypted archive with a user-supplied password out of the contents of directory dir, resulting in dir.enc: enc -p dir

Decrypting the contents of enc-encrypted archive dir.enc into directory enc_????????: enc dir.enc

Encrypting enc-encrypted archive file.enc again: enc --encrypt file.enc

Install

  • gobinaries.com: wget -qO- gobinaries.com/pepa65/enc |sh
  • Go get If Golang is installed properly: go get github.com/pepa65/enc
  • Go build/install
    • git clone https://github.com/pepa65/enc; cd enc; go install
    • Smaller binary: go build -ldflags="-s -w"; upx enc
  • Build for other architectures
GOOS=linux GOARCH=arm go build -ldflags="-s -w" -o enc_pi
GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o enc_freebsd
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o enc_osx
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o enc.exe

About

Encrypt/decrypt files/directories

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%