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: ?,
})
// ...
}
慕田峪4524236
相关分类