Skip to content

Commit 14b53f0

Browse files
committed
test case
1 parent bd96720 commit 14b53f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

data/transactions/logic/crypto_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ byte 0x98D2C31612EA500279B6753E5F6E780CA63EBA8274049664DAD66A2565ED1D2A
117117
testAccepts(t, progText, 1)
118118
}
119119

120+
func TestSHA512(t *testing.T) {
121+
partitiontest.PartitionTest(t)
122+
t.Parallel()
123+
124+
// echo -n "hello" | sha512sum
125+
progText := `
126+
byte "hello"; sha512
127+
byte 0x9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043
128+
==`
129+
testAccepts(t, progText, 13)
130+
}
131+
120132
func TestMimc(t *testing.T) {
121133
// We created test vectors for the MiMC hash function by defining a set of preimages for different
122134
// input sizes and calling gnark-crypto's MiMC implementation to compute the expected hash values.

0 commit comments

Comments
 (0)