Documentation ¶
Index ¶
- func DecodePemToPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
- func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
- func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
- func GeneratePublicKey(privatekey *rsa.PublicKey) ([]byte, error)
- func WriteKeyToFile(keyBytes []byte, saveFileTo string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePemToPrivateKey ¶
func DecodePemToPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
DecodePemToPrivateKey - Decoded Back PEM ([]Byte) to RSA PrivateKey
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)
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.