我想签从ASCII装甲在去language.For私钥是我公司开发下面的代码,但问题是,当我检查GPG签名的公钥--check-特别兴趣小组通过代码创建的签名显示为"坏签名".请帮助,因为我无法弄清楚任何解决问题的方法.我已经发布了golang-nuts.我只是在学习golang我的大学项目而且我被困在这里,请帮忙.
// signer
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"code.google.com/p/go.crypto/openpgp/packet"
"fmt"
)
// This function takes asciiarmored private key which will sign the public key
//Public key is also ascii armored,pripwd is password of private key in string
//This function will return ascii armored signed public key i.e. (pubkey+sign by prikey)
func SignPubKeyPKS(asciiPub string, asciiPri string, pripwd string) (asciiSignedKey string) {
//get Private key from armor
_, priEnt := getPri(asciiPri, pripwd) //pripwd is the password todecrypt the private key …Run Code Online (Sandbox Code Playgroud)