发布于 2020-02-20 16:31:55
在你的example linked中,你可以看到它decrypts了一个字节片[]byte。它可以是来自加密文件的内容。
您可以将
decrypted, err := pgp.Decrypt(privEntity, encrypted)
if err != nil {
t.Error(err)
}通过
encrypted, err := ioutil.ReadFile(filename)
if err != nil {
t.Error(err)
}
decrypted, err := pgp.Decrypt(privEntity, encrypted)
if err != nil {
t.Error(err)
}https://stackoverflow.com/questions/60313758
复制相似问题