以下Go命令的等价命令是什么?
openssl genrsa -des3 -passout pass:mypassword -out myfile.key 2048
到目前为止我所做的...
package main
import (
"crypto/des"
"crypto/rand"
"crypto/rsa"
"encoding/pem"
)
func main() {
key, _ := rsa.GenerateKey(rand.Reader, 2048)
// Do something with des.NewTripleDESCipher(...)?
keyPem := pem.EncodeToMemory(&pem.Block{
Type: "RSA PRIVATE KEY",
Bytes: ?,
})
// ...
}