= openpgp.PublicKeyType { return nil, errors.New("Invalid public key data") } packetReader := packet.NewReader(block.Body) pkt, err := packetReader.Next() if err != nil { return nil, err } key, ok := pkt.(*packet.PublicKey) if !ok { return nil, err } return key, nil}fun...
For my part, if I retrieve the URL you showed then I get a PEM-encoded PGP public key, with the following prefix: (I'm not including the full key in here because I don't want to encourage folks who see this to try to import random keys from GitHub comments 😀) ...
所以我想明白了,问题不在库中,它们与另一个库兼容,而是通过AJAX POST请求传输加密的PGP消息。