Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 771 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 771 Bytes

Encrypta

GoDoc codecov

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