Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ecies
✓ github.com/ecies/go/v2
Encrypts and decrypts a message using ECIES.
package main
import (
"fmt"
"log"
"github.com/ecies/go/v2"
)
func main() {
privateKey, err := ecies.GenerateKey()
if err != nil {
log.Fatal(err)
}
publicKey := privateKey.PublicKey
plaintext := []byte("Hello, ECIES!")
ciphertext, err := ecies.Encrypt(publicKey, plaintext)
if err != nil {
log.Fatal(err)
}
decrypted, err := ecies.Decrypt(privateKey, ciphertext)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(decrypted))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2.0.11latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.