https://github.com/slaveofcode/age-encryption
Example implementation encrypt-decrypt file with age-encryption
https://github.com/slaveofcode/age-encryption
Last synced: 10 months ago
JSON representation
Example implementation encrypt-decrypt file with age-encryption
- Host: GitHub
- URL: https://github.com/slaveofcode/age-encryption
- Owner: slaveofcode
- Created: 2022-08-09T13:36:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-09T19:13:22.000Z (over 3 years ago)
- Last Synced: 2024-04-24T05:36:44.852Z (over 1 year ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Age Implementation
### Encryption
1. Go to **cmd/encrypt** directory
2. Remove example encrypted file at `cmd/encrypt/encfiles/a.txt.age`
3. Run `go run cmd.go` from **cmd/encrypt** directory
4. You'll see a new file appears at `cmd/encrypt/encfiles/a.txt.age`
### Decryption
1. Go to **cmd/decrypt** directory
2. Remove example decrypted file at `cmd/decrypt/files/a.txt`
3. Copy encrypted file from `cmd/encrypt/encfiles/a.txt.age` to `cmd/decrypt/encfiles/a.txt.age`
4. Run `go run cmd.go` from **cmd/decrypt** directory
5. You'll see a new file appears at `cmd/decrypt/files/a.txt`
## Generate Key
1. Go to **cmd/generate-key**
2. Remove example generated key file at `cmd/generate-key/key.txt`
3. Run `go run cmd.go`
4. You'll see a new generated key stored at `key.txt`