mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
iter
This commit is contained in:
@ -7,8 +7,19 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/charlienet/go-mixed/hash"
|
||||
"github.com/charlienet/go-mixed/rand"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestHashComplie(t *testing.T) {
|
||||
abc, err := hash.New("MD5")
|
||||
if err != nil {
|
||||
|
||||
}
|
||||
b, _ := hex.DecodeString(rand.Hex.Generate(16))
|
||||
assert.False(t, abc.Verify([]byte("source"), b))
|
||||
}
|
||||
|
||||
func TestEncode(t *testing.T) {
|
||||
t.Log(hash.Sha1([]byte{0x31}).Base64())
|
||||
t.Log(hash.Sha1([]byte{0x31}).Hex())
|
||||
|
Reference in New Issue
Block a user