Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ message, err := helper.DecryptMessageWithPassword(password, armor)

To encrypt binary data or use more advanced modes:
```go
import "github.com/ProtonMail/gopenpgp/v2/constants"
import "github.com/ProtonMail/gopenpgp/v2/crypto"

const password = []byte("hunter2")

Expand All @@ -121,11 +121,11 @@ var message = crypto.NewPlainMessage(data)
message = crypto.NewPlainMessageFromString(string)

// Encrypt data with password
encrypted, err := EncryptMessageWithPassword(message, password)
encrypted, err := crypto.EncryptMessageWithPassword(message, password)
// Encrypted message in encrypted.GetBinary() or encrypted.GetArmored()

// Decrypt data with password
decrypted, err := DecryptMessageWithPassword(encrypted, password)
decrypted, err := crypto.DecryptMessageWithPassword(encrypted, password)

//Original message in decrypted.GetBinary()
```
Expand Down