Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptAlg ¶
type EncryptAlg interface { PubEncrypt([]byte) (string, error) PriEncrypt([]byte) (string, error) PriDecrypt(string) ([]byte, error) PubDecrypt(string) ([]byte, error) PriEncryptSign([]byte) (string, error) //加密,加盐,hash后签名,出结果 VerifySign([]byte, string) error }
输出结果都是base64编码的字串
func GetDefaultRsaAlg ¶
func GetDefaultRsaAlg() (EncryptAlg, error)
func NewRsaEncrypt ¶
func NewRsaEncrypt(pemBytes []byte) (EncryptAlg, error)
Click to show internal directories.
Click to hide internal directories.