(private *rsa.PrivateKey)
| 479 | } |
| 480 | |
| 481 | func EncodePrivateKey(private *rsa.PrivateKey) []byte { |
| 482 | return pem.EncodeToMemory(&pem.Block{ |
| 483 | Bytes: x509.MarshalPKCS1PrivateKey(private), |
| 484 | Type: "RSA PRIVATE KEY", |
| 485 | }) |
| 486 | } |
| 487 | |
| 488 | func EncodePublicKey(public *rsa.PublicKey) ([]byte, error) { |
| 489 | publicBytes, err := x509.MarshalPKIXPublicKey(public) |
no outgoing calls