first commit
This commit is contained in:
19
pkg/tools/strings_test.go
Normal file
19
pkg/tools/strings_test.go
Normal file
@ -0,0 +1,19 @@
|
||||
package tools
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestMD5(t *testing.T) {
|
||||
str, salt := "123", "456"
|
||||
println(MD5(str))
|
||||
println(MD5(str + salt))
|
||||
println(MD5WithSalt(str, salt))
|
||||
}
|
||||
|
||||
func TestRandSaltN(t *testing.T) {
|
||||
for i := 1; i < 10; i++ {
|
||||
println(RandSalt())
|
||||
for j := 0; j < 10; j++ {
|
||||
println(RandSaltN(uint8(i)))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user