What is the equivalent of the following command in Go?
openssl genrsa -des3 -passout pass:mypassword -out myfile.key 2048
What I have so far...
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: ?,
})
// ...
}