https://github.com/sgaunet/gocrypt
gocrypt is a command line tool to encrypt/decrypt file in AES128/256/512.
https://github.com/sgaunet/gocrypt
aes cli crypt decrypt encypt golang
Last synced: 11 months ago
JSON representation
gocrypt is a command line tool to encrypt/decrypt file in AES128/256/512.
- Host: GitHub
- URL: https://github.com/sgaunet/gocrypt
- Owner: sgaunet
- License: mit
- Created: 2022-04-01T07:34:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-01T21:05:46.000Z (12 months ago)
- Last Synced: 2025-03-01T22:18:55.437Z (12 months ago)
- Topics: aes, cli, crypt, decrypt, encypt, golang
- Language: Go
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/sgaunet/gocrypt)
[](https://github.com/sgaunet/gocrypt/releases/latest)

[](https://codeclimate.com/github/sgaunet/gocrypt/maintainability)
[](https://godoc.org/github.com/sgaunet/gocrypt)
[](LICENSE)
# Gocrypt
gocrypt is a command line tool to encrypt/decrypt file in AES128/256/512.
Usage is quite simple :
```
$ gocrypt help
Tool to encrypt/decrypt file in AES128/256/512.
Usage:
gocrypt [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
dec decrypt file in AES 128/256/512
enc encrypt file in AES 128/256/512
help Help about any command
version print version of gocrypt
Flags:
-h, --help help for gocrypt
Use "gocrypt [command] --help" for more information about a command.
```
Here is a little demo:

Even if I still maintain this little tool, you should rather consider to use [age](https://github.com/FiloSottile/age) which is a more complete and secure tool.
# Install
Download the binary in the release section. There is no docker image, but you can install a binary in your Docker image if needed. If you want to create a docker image from scratch, you will need to do a multi stage docker build in order to download the binary.
## With homebrew
```
brew tap sgaunet/homebrew-tools
brew install sgaunet/tools/gocrypt
```
## Use it in your own Docker image
```
FROM sgaunet/gocrypt:latest as gocrypt
FROM alpine:latest
COPY --from=gocrypt /gocrypt /usr/local/bin/gocrypt
...
```
# Tests
Tests are done with [venom](https://github.com/ovh/venom).
```
cd tests
venom run
```
# Development
This project is using :
* golang
* [task for development](https://taskfile.dev/#/)
* docker
* [docker buildx](https://github.com/docker/buildx)
* docker manifest
* [goreleaser](https://goreleaser.com/)
* [venom](https://github.com/ovh/venom) : Tests
* [pre-commit](https://pre-commit.com/)
There are hooks executed in the precommit stage. Once the project cloned on your disk, please install pre-commit:
```
brew install pre-commit
```
Install tools:
```
task dev:install-prereq
```
And install the hooks:
```
task dev:install-pre-commit
```
If you like to launch manually the pre-commmit hook:
```
task dev:pre-commit
```