package main import ( crypto/rand crypto/rsa crypto/x509 encoding/pem flag log os ) func main() { if err := GenerateRSAKey(); err != nil { log.Fatal(密钥生成失败) } log.Println(密钥生成成功) } func GenerateRSAKey() error { //1 RSA生成私钥文件步骤 //--1生成RSA私钥对 var bits int flag.IntVa