Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ECPrivateKeyBlockType is a possible value for pem.Block.Type. ECPrivateKeyBlockType = "EC PRIVATE KEY" // RSAPrivateKeyBlockType is a possible value for pem.Block.Type. RSAPrivateKeyBlockType = "RSA PRIVATE KEY" // PrivateKeyBlockType is a possible value for pem.Block.Type. PrivateKeyBlockType = "PRIVATE KEY" )
Variables ¶
This section is empty.
Functions ¶
func GenerateECKey ¶
func GenerateECKey(curve string) (ecKey *ecdsa.PrivateKey, err error)
func GenerateRSAKey ¶
func GenerateRSAKey(bitLength int) (rsaKey *rsa.PrivateKey, err error)
func GetMaxRSAKeyLengthBits ¶
func GetMaxRSAKeyLengthBits() int
func GetSupportedECCurves ¶
func ParsePrivateKeyPEM ¶
ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data. Recognizes PEM blocks for "EC PRIVATE KEY", "RSA PRIVATE KEY", or "PRIVATE KEY"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.