MCPcopy Index your code
hub / github.com/kubernetes/node-problem-detector / EncodePrivateKey

Function EncodePrivateKey

test/e2e/lib/ssh/lib.go:481–486  ·  view source on GitHub ↗
(private *rsa.PrivateKey)

Source from the content-addressed store, hash-verified

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

Callers 2

runTestSSHServerFunction · 0.85
TestSSHTunnelFunction · 0.85

Calls

no outgoing calls

Tested by 2

runTestSSHServerFunction · 0.68
TestSSHTunnelFunction · 0.68