Documentation ¶
Index ¶
Constants ¶
View Source
const ( RSA_BITS = 2048 // Default number of bits in an RSA key RSA_BITS_MIN = 768 // Minimum number of bits in an RSA key )
Variables ¶
This section is empty.
Functions ¶
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*rsa.PrivateKey, error)
helper function to generate an RSA Private Key.
func MarshalPrivateKey ¶
func MarshalPrivateKey(private *rsa.PrivateKey) []byte
helper function that marshalls an RSA Private Key to a PEM encoded file.
func MarshalPublicKey ¶
helper function that marshalls an RSA Public Key to an SSH .authorized_keys format
func UnmarshalPrivateKey ¶
func UnmarshalPrivateKey(private []byte) *rsa.PrivateKey
UnmarshalPrivateKey is a helper function that unmarshals a PEM bytes to an RSA Private Key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.