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

Function EncodePublicKey

test/e2e/lib/ssh/lib.go:488–497  ·  view source on GitHub ↗
(public *rsa.PublicKey)

Source from the content-addressed store, hash-verified

486}
487
488func EncodePublicKey(public *rsa.PublicKey) ([]byte, error) {
489 publicBytes, err := x509.MarshalPKIXPublicKey(public)
490 if err != nil {
491 return nil, err
492 }
493 return pem.EncodeToMemory(&pem.Block{
494 Bytes: publicBytes,
495 Type: "PUBLIC KEY",
496 }), nil
497}
498
499func EncodeSSHKey(public *rsa.PublicKey) ([]byte, error) {
500 publicKey, err := ssh.NewPublicKey(public)

Callers 1

runTestSSHServerFunction · 0.85

Calls

no outgoing calls

Tested by 1

runTestSSHServerFunction · 0.68