Documentation ¶
Index ¶
- func NewKey2048() (privateKey, publicKey []byte, err error)
- func NewKey3072() (privateKey, publicKey []byte, err error)
- func NewKey4096() (privateKey, publicKey []byte, err error)
- func PemToPrivateKey(pemData []byte) (*rsa.PrivateKey, error)
- func PemToPublicKey(pemData []byte) (*rsa.PublicKey, error)
- func PrivateKeyToPem(key *rsa.PrivateKey) []byte
- func PublicKeyToPem(key *rsa.PublicKey) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKey2048 ¶
NewKey2048 will generate a new 2048 bit key for RSA
2048 bits is generally considered the best tradeoff between security and performance at the time of writing. Probably this will remain the case until 2030.
func NewKey3072 ¶
NewKey3072 will generate a new 3072 bit key for RSA.
Use a 3072 bit key for extra performance, at the cost of performance.
func NewKey4096 ¶
NewKey4096 will generate a new 4096 bit key for RSA
Use a 4096 bit key maximum security, at the cost of performance.
func PemToPrivateKey ¶
func PemToPrivateKey(pemData []byte) (*rsa.PrivateKey, error)
func PrivateKeyToPem ¶
func PrivateKeyToPem(key *rsa.PrivateKey) []byte
func PublicKeyToPem ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.