Documentation ¶ Index ¶ func CheckPassword(password, hash string) (bool, error) func HashPassword(password string) (string, error) func RandomInt(n int) int func RandomString(n int) string func RandomStringWithSymbols(n int) string func SafeLikeString(str string) string func StringMd5(data string) string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func CheckPassword ¶ func CheckPassword(password, hash string) (bool, error) CheckPassword 密码校验 func HashPassword ¶ func HashPassword(password string) (string, error) HashPassword 密码混淆 func RandomInt ¶ func RandomInt(n int) int RandomInt 获取随机数(并发安全) func RandomString ¶ func RandomString(n int) string RandomString 随机字符串 func RandomStringWithSymbols ¶ func RandomStringWithSymbols(n int) string RandomStringWithSymbols 带特殊符号的随机字符串 func SafeLikeString ¶ func SafeLikeString(str string) string SafeLikeString 安全的模糊查询字符串 func StringMd5 ¶ func StringMd5(data string) string StringMd5 获取字符串的md5值 Types ¶ This section is empty. Source Files ¶ View all Source files random.gosafe.gostring.go Click to show internal directories. Click to hide internal directories.