Documentation ¶
Index ¶
- func GenRSAKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)
- func GenRSAPrivateKey(bits int) ([]byte, error)
- func ParseRSAPPublicKey(key string) (*rsa.PublicKey, error)
- func ParseRSAPrivateKey(key string) (*rsa.PrivateKey, error)
- func RSAPrivate2Bytes(privateKey *rsa.PrivateKey) ([]byte, error)
- func RSAPublicKey2Bytes(publicKey *rsa.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenRSAKeyPair ¶
GenRSAKeyPair create rsa key pair
func GenRSAPrivateKey ¶
GenRSAPrivateKey generate a rsa private key
func ParseRSAPPublicKey ¶
ParseRSAPPublicKey convert string to pub key
func ParseRSAPrivateKey ¶
func ParseRSAPrivateKey(key string) (*rsa.PrivateKey, error)
ParseRSAPrivateKey convert string to private key
func RSAPrivate2Bytes ¶
func RSAPrivate2Bytes(privateKey *rsa.PrivateKey) ([]byte, error)
RSAPrivate2Bytes expose bytes of private key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.