mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
add gcrc test2
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
package gcrc32_test
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/g/crypto/gmd5"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/g/crypto/gcrc32"
|
||||
@ -34,5 +35,10 @@ func TestEncrypt(t *testing.T) {
|
||||
encrypt2 := gcrc32.Encrypt([]byte(s))
|
||||
gtest.AssertEQ(int(encrypt1), result)
|
||||
gtest.AssertEQ(int(encrypt2), result)
|
||||
|
||||
strmd5 := gmd5.Encrypt(s)
|
||||
test1 := gcrc32.Encrypt(strmd5)
|
||||
test2 := gcrc32.Encrypt([]byte(strmd5))
|
||||
gtest.AssertEQ(test2, test1)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user