Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePrivateKeyToPEM ¶
func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
encodePrivateKeyToPEM encodes Private Key from RSA to PEM format
func GeneratePrivateKey ¶
func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
↓ https://gist.github.com/devinodaniel/8f9b8a4f31573f428f29ec0e884e6673 generatePrivateKey creates a RSA Private Key of specified byte size
func GeneratePublicKey ¶
generatePublicKey take a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ..."
func WriteKeyToFile ¶
writePemToFile writes keys to a file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.