sawadashota / encrypta

Keybase friendly, encrypts text by public key.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encrypta

GoDoc CircleCI codecov Go Report Card GolangCI

Keybase friendly, encrypts text by public key.

Example

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

About

Keybase friendly, encrypts text by public key.

License:MIT License


Languages

Language:Go 100.0%