Documentation ¶
Index ¶
- func ConvertPemToPrivateKey(skPem string) (*rsa.PrivateKey, error)
- func ConvertPemToPublicKey(pubPem []byte) (*rsa.PublicKey, error)
- func DecodeKey(sk *rsa.PrivateKey, hash []byte) ([]byte, error)
- func ExtractPublicKey(sk *rsa.PrivateKey) (string, error)
- func GenerateKeys() ([]byte, []byte, error)
- func PrivateKeyToByte(sk *rsa.PrivateKey) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPemToPrivateKey ¶
func ConvertPemToPrivateKey(skPem string) (*rsa.PrivateKey, error)
ConvertPemToPrivateKey return rsa private key from secret key
func ConvertPemToPublicKey ¶ added in v1.1.0
ConvertPemToPublicKey return rsa public key from public key pem
func DecodeKey ¶
func DecodeKey(sk *rsa.PrivateKey, hash []byte) ([]byte, error)
DecodeKey with secret key (rsa) and hash (base64), return the decrypted key
func ExtractPublicKey ¶
func ExtractPublicKey(sk *rsa.PrivateKey) (string, error)
ExtractPublicKey get public key from private key and return base64 encoded public key
func GenerateKeys ¶
GenerateKeys using rsa random generate keys and return []byte bas64
func PrivateKeyToByte ¶
func PrivateKeyToByte(sk *rsa.PrivateKey) []byte
PrivateKeyToByte converts privateKey to []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.