diff --git a/lib/cgo/tests/check_cipher.bip44.bip44.c b/lib/cgo/tests/check_cipher.bip44.bip44.c index 30fc6da29..541f4a067 100644 --- a/lib/cgo/tests/check_cipher.bip44.bip44.c +++ b/lib/cgo/tests/check_cipher.bip44.bip44.c @@ -27,7 +27,7 @@ void mustDefaultSeed(GoSlice* seed) GoString_ str = {strTmp, 0}; err = SKY_base58_Hex2String(*seed, &str); ck_assert_int_eq(err, SKY_OK); - ck_assert_str_eq("24e563fb095d766df3862c70432cc1b2210b24d232da69af7af09d2ec86d28782ce58035bae29994c84081836aebe36a9b46af1578262fefc53e37efbe94be57", str.p); + ck_assert(strncmp(str.p, "24e563fb095d766df3862c70432cc1b2210b24d232da69af7af09d2ec86d28782ce58035bae29994c84081836aebe36a9b46af1578262fefc53e37efbe94be57", 128) == SKY_OK); } START_TEST(TestNewCoin) diff --git a/lib/cgo/tests/check_cipher.hash.common.c b/lib/cgo/tests/check_cipher.hash.common.c index 4c1983c44..f243d85aa 100644 --- a/lib/cgo/tests/check_cipher.hash.common.c +++ b/lib/cgo/tests/check_cipher.hash.common.c @@ -106,7 +106,7 @@ START_TEST(TestSHA256KnownValue) SKY_cipher_SHA256_Hex(&sha, &tmp_output); registerMemCleanup((void*)tmp_output.p); - ck_assert(strcmp(tmp_output.p, vals[i].output) == SKY_OK); + ck_assert(strncmp(tmp_output.p, vals[i].output, strlen(vals[i].output)) == SKY_OK); } } END_TEST @@ -117,7 +117,8 @@ START_TEST(TestSumSHA256) GoUint8 cbuff[257]; GoSlice b = {bbuff, 0, 257}; cipher__SHA256 h1; - randBytes(&b, 256); + // randBytes(&b, 256); + SKY_cipher_RandByte(256, &b); SKY_cipher_SumSHA256(b, &h1); cipher__SHA256 tmp = ""; ck_assert_int_eq(isU8Eq(h1, tmp, 32), 0);