- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for MarshalPKCS1PublicKey (0.17 sec)
-
src/crypto/x509/pkcs1.go
} return &rsa.PublicKey{ E: pub.E, N: pub.N, }, nil } // MarshalPKCS1PublicKey converts an [RSA] public key to PKCS #1, ASN.1 DER form. // // This kind of key is commonly encoded in PEM blocks of type "RSA PUBLIC KEY". func MarshalPKCS1PublicKey(key *rsa.PublicKey) []byte { derBytes, _ := asn1.Marshal(pkcs1PublicKey{ N: key.N, E: key.E, }) return derBytes
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 4.7K bytes - Viewed (0) -
docs/debugging/inspect/main.go
} err = pem.Encode(privatePem, privateKeyBlock) if err != nil { fmt.Printf("error when encode private pem: %s n", err) os.Exit(1) } // dump public key to file publicKeyBytes := x509.MarshalPKCS1PublicKey(&privatekey.PublicKey) if err != nil { fmt.Printf("error when dumping publickey: %s n", err) os.Exit(1) } publicKeyBlock := &pem.Block{ Type: "PUBLIC KEY", Bytes: publicKeyBytes, }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 31 14:49:23 UTC 2024 - 5.2K bytes - Viewed (0)