diff --git a/g/crypto/gcrc32/gcrc32_test.go b/g/crypto/gcrc32/gcrc32_test.go index 27c301fbc..7a67d1c41 100644 --- a/g/crypto/gcrc32/gcrc32_test.go +++ b/g/crypto/gcrc32/gcrc32_test.go @@ -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) }) }