Documentation ¶
Index ¶
- Constants
- func FromPEMBytesToPrivateKey(b []byte) (*rsa.PrivateKey, error)
- func FromPEMBytesToPublicKey(b []byte) (*rsa.PublicKey, error)
- func FromPrivateKeyPEMBytesToPublicKeyPEMBytes(b []byte) ([]byte, error)
- func FromPrivateKeyToPEMBytes(key *rsa.PrivateKey) ([]byte, error)
- func FromPrivateKeyToPublicKeyPEMBytes(key *rsa.PrivateKey) ([]byte, error)
- func GenerateKey(bits int) (*rsa.PrivateKey, error)
- func IsPrivateKeyPEMBytes(b []byte) bool
- func IsPublicKeyPEMBytes(b []byte) bool
Constants ¶
View Source
const DefaultKeySize = 2048
Variables ¶
This section is empty.
Functions ¶
func FromPEMBytesToPrivateKey ¶
func FromPEMBytesToPrivateKey(b []byte) (*rsa.PrivateKey, error)
func FromPrivateKeyToPEMBytes ¶
func FromPrivateKeyToPEMBytes(key *rsa.PrivateKey) ([]byte, error)
func FromPrivateKeyToPublicKeyPEMBytes ¶
func FromPrivateKeyToPublicKeyPEMBytes(key *rsa.PrivateKey) ([]byte, error)
func GenerateKey ¶
func GenerateKey(bits int) (*rsa.PrivateKey, error)
GenerateKey generates a new default RSA keypair.
func IsPrivateKeyPEMBytes ¶
func IsPublicKeyPEMBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.