Documentation ¶
Index ¶
- Constants
- func CheckPasswordHash(password, hash string) bool
- func Decrypt3Des(enStr string, key string) (string, error)
- func Encrypt3Des(src string, key string) (string, error)
- func HashPassword(password string) (string, error)
- func Md5FileSum(filepath string) (string, error)
- func Md5ParamSign(paramMap map[string]interface{}, appKey string, appVal string, ...) string
- func RSAKeyGen(bits int) (string, string, error)
- func RsaPrivateDecrypt(privateKey []byte, encrypted []byte) ([]byte, error)
- func RsaPrivateSign(privateKey []byte, data string) ([]byte, error)
- func RsaPubVerifySign(pubKey []byte, data string, sign string) error
- func RsaPublicEncrypt(pubKey []byte, data []byte) ([]byte, error)
Constants ¶
View Source
const ( CHAR_SET = "UTF-8" BASE_64_FORMAT = "UrlSafeNoPadding" RSA_ALGORITHM_KEY_TYPE = "PKCS8" RSA_ALGORITHM_SIGN = crypto.SHA256 )
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func HashPassword ¶
func Md5FileSum ¶ added in v0.2.5
func Md5ParamSign ¶ added in v0.2.5
func Md5ParamSign(paramMap map[string]interface{}, appKey string, appVal string, secretKey, secretVal string) string
md5参数加签,返回加签后的md5字符串 paramMap 待校验参数 appKey 应用的appkey的名称 appVal 应用的appkey的值 secretKey 应用的secretkey的名称 secretVal 应用的secretkey的值
func RsaPrivateDecrypt ¶
私钥解密
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.