https://github.com/penguingovernor/goxor
GoXor is a command line tool that encrypts and decrypts data.
https://github.com/penguingovernor/goxor
cli command-line-tool decryption encryption go golang
Last synced: 5 months ago
JSON representation
GoXor is a command line tool that encrypts and decrypts data.
- Host: GitHub
- URL: https://github.com/penguingovernor/goxor
- Owner: penguingovernor
- License: apache-2.0
- Created: 2017-09-16T07:34:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T01:45:03.000Z (over 7 years ago)
- Last Synced: 2024-06-20T02:06:04.229Z (about 2 years ago)
- Topics: cli, command-line-tool, decryption, encryption, go, golang
- Language: Go
- Size: 39.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goxor #
[](https://goreportcard.com/report/github.com/PenguinGovernor/goxor)
GoXor is an encryption method written in the [Go programming language](https://golang.org/), and is based on a [xor cipher](https://en.wikipedia.org/wiki/XOR_cipher) in conjunction with a [one-time pad](https://en.wikipedia.org/wiki/One-time_pad).
### Download and Install
1. Install and configure Go for you operating system. [See Here](https://golang.org/doc/install)
2. Once Go is installed and configured, run this command to install the `goxor` tool
```shell
go get github.com/penguingovernor/goxor
```
### Testing
To ensure that installation went smoothly run the `go test` tool
```shell
go test -v github.com/penguingovernor/goxor/xor
```
### Documentation
After installing, you can use `goxor help` to get documentation:
```shell
goxor help
```
### Running goxor
`goxor` has two sub-commands: encrypt and decrypt.
Example:
```shell
# Encrypts input hello.txt using a one time pad as the key, 'goxor' as the signature, outputs out.xor and out.xor.key
goxor encrypt -i hello.txt
# Decrypts input out.xor using out.xor.key as the key, this will output to stdout
goxor decrypt -i out.xor -k out.xor.key
```
The `goxor encrypt` command can encrypt files. It supports the following flags:
* `--input=` or `-i`: The file to be encrypted. If the file cannot be found then the input is treated as a string. If omitted `goxor encrypt` will read from stdin
* `--output=` or `-o`: The desired file name to output the encrypted data to. Omitting this flag mode causes `goxor encrypt` to output to out.xor. If the string 'stdout' is passed to `goxor encrypt --output` then the encrypted data is written to stdout
* `--key_out` or `-K`: The desired file name to output the key to. Omitting this flag causes `goxor encrypt` to output to out.xor.key. If the string 'stdout' is passed to `goxor encrypt --key_out` then the key is written to stdout
* `--signature` or `-s`: The file or string to use as the encryption signature. If omitted the string `goxor` is used as the signature. If stdin is passed then the input from stdin is used as the signature.
* `--key` or `-k`: The file or string to use as the encryption key. If omitted a one time pad is used as the key. If stdin is passed then the input from stdin is used as the key.
The `goxor decrypt` command can decrypt files. It supports the following flags:
* `--input=` or `-i`: The file to be decrypted.
* `--output=` or `-o`: The desired file name to output the decrypted data to. Omitting this flag mode causes `goxor decrypt` to output to stdout.
* `--key` or `-k`: The file to use as the decryption key.