- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for MarshalPKCS1PrivateKey (0.14 sec)
-
docs/debugging/inspect/main.go
privatekey, err := rsa.GenerateKey(crand.Reader, 2048) if err != nil { fmt.Printf("error generating key: %s n", err) os.Exit(1) } // dump private key to file privateKeyBytes := x509.MarshalPKCS1PrivateKey(privatekey) privateKeyBlock := &pem.Block{ Type: "RSA PRIVATE KEY", Bytes: privateKeyBytes, } privatePem, err := os.Create("support_private.pem") if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 31 14:49:23 UTC 2024 - 5.2K bytes - Viewed (0) -
cmd/test-utils_test.go
return nil } } pemBlockForKey := func(priv interface{}) *pem.Block { switch k := priv.(type) { case *rsa.PrivateKey: return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)} case *ecdsa.PrivateKey: b, err := x509.MarshalECPrivateKey(k) if err != nil { fmt.Fprintf(os.Stderr, "Unable to marshal ECDSA private key: %v", err) os.Exit(2) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0)