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.
crypto
✓ github.com/ProtonMail/go-crypto
Generate OpenPGP key pair
package main
import (
"fmt"
"github.com/ProtonMail/go-crypto/openpgp"
)
func main() {
// Example: generate a key pair
entity, err := openpgp.NewEntity("name", "comment", "email@example.com", nil)
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println("Key generated:", entity.PrimaryKey.KeyIdShortString())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.4.1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.