https://github.com/sawadashota/encrypta
Keybase friendly, encrypts text by public key.
https://github.com/sawadashota/encrypta
encrypt keybase pgp
Last synced: 11 months ago
JSON representation
Keybase friendly, encrypts text by public key.
- Host: GitHub
- URL: https://github.com/sawadashota/encrypta
- Owner: sawadashota
- License: mit
- Created: 2019-03-16T07:26:35.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-02-21T08:19:12.000Z (11 months ago)
- Last Synced: 2025-02-21T09:27:39.334Z (11 months ago)
- Topics: encrypt, keybase, pgp
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Encrypta
===
[](https://godoc.org/github.com/sawadashota/encrypta)
[](https://codecov.io/gh/sawadashota/encrypta)
[Keybase](https://keybase.io) friendly, encrypts text by public key.
Example
---
```go
pk, err := encrypta.NewPublicKeyFromKeybase("sawadashota")
if err != nil {
// error handling
}
enc, err := pk.Encrypt([]byte("I'm encrypted text"))
if err != nil {
// error handling
}
fmt.Println(enc.Base64Encode())
// Stdout base64 encoded encrypted text
```
To decode this, private key holder executes following command
```
$ go run main.go | base64 --decode | keybase pgp decrypt
I'm encrypted text
```