Ron Rise f1a3d7cd0d
All checks were successful
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Successful in 1m5s
Push poorly written test can down the road another ten years
2025-05-13 22:13:45 -04:00
2024-05-01 20:09:49 -04:00
2024-05-01 20:09:49 -04:00
2024-04-20 10:33:41 -04:00
2024-04-20 10:33:41 -04:00
2024-04-20 10:33:41 -04:00
2024-04-20 10:33:41 -04:00
2024-04-30 16:10:44 -04:00
2024-04-20 10:58:55 -04:00

RSA Public/Private Key File Encryption

Build

Nothing special is needed to build.

go build --ldflags="-X 'github.com/siteworxpro/rsa-file-encryption/printer.Version=$(git describe --tags --abbrev=0)'"

Generating Keys

Generates a set of RSA key pairs. Default size is 4096 bits. Minimum size is 2048 bits and maximum is 16384 bits

NAME:
rsa-file-encryption generate-keypair - generate a keypair

USAGE:
rsa-file-encryption generate-keypair [command options] [arguments...]

OPTIONS:
--size value, -s value  the size of the private key (default: 4096)
--file value, -f value  the path to the private key file
--force, -F             overwrite the private key file (default: false)
--help, -h              show help
./rsa-file-encryption generate-keypair -s 4096 -f my-key

Encrypting

Encrypt a file with a public RSA Key

NAME:
   rsa-file-encryption encrypt - encrypt a file

USAGE:
   rsa-file-encryption encrypt [command options] [arguments...]

OPTIONS:
   --file value, -f value        file to encrypt
   --public-key value, -p value  public key path
   --force, -F                   overwrite the encrypted file (default: false)
   --help, -h                    show help
./rsa-file-encryption encrypt --file file_to_encrypt.txt --public-key my-key.pub

Decrypting

Decrypt a file with a private RSA key

NAME:
   rsa-file-encryption decrypt - decrypt a file

USAGE:
   rsa-file-encryption decrypt [command options] [arguments...]

OPTIONS:
   --file value, -f value         file to decrypt
   --private-key value, -p value  private key path
   --out value, -o value          output file name
   --force, -F                    overwrite the encrypted file (default: false)
   --help, -h                     show help
./rsa-file-encryption decrypt --file file_to_encrypt.txt.enc --out file_decrypted --private-key my-key
Description
No description provided
Readme Apache-2.0 62 KiB
v1.3.0 Latest
2025-08-31 03:06:24 +00:00
Languages
Go 97.1%
Shell 2.9%