diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-23 01:34:31 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-23 01:34:31 +0800 |
commit | ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9 (patch) | |
tree | ac183aa3312a4589cb3e4995cc103cfa58ef95da /ethcrypto | |
parent | 8ef17c2fb138ae254a0cc7ac509a7ab1177ee4ac (diff) | |
parent | 7d08e4f7d14600ee4ed38fc9d435e9c2e0e0fdac (diff) | |
download | dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.tar dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.tar.gz dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.tar.bz2 dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.tar.lz dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.tar.xz dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.tar.zst dexon-ce149d2733bd55e8e9b16dd4b60b6bad17c3d7d9.zip |
Merge branch 'release/0.6.5'
Diffstat (limited to 'ethcrypto')
-rw-r--r-- | ethcrypto/crypto_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ethcrypto/crypto_test.go b/ethcrypto/crypto_test.go new file mode 100644 index 000000000..7323e1646 --- /dev/null +++ b/ethcrypto/crypto_test.go @@ -0,0 +1,17 @@ +package ethcrypto + +import ( + "bytes" + "testing" + + "github.com/ethereum/eth-go/ethutil" +) + +// FIPS 202 test (reverted back to FIPS 180) +func TestSha3(t *testing.T) { + const exp = "3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532" + sha3_256 := Sha3Bin([]byte("abc")) + if bytes.Compare(sha3_256, ethutil.Hex2Bytes(exp)) != 0 { + t.Errorf("Sha3_256 failed. Incorrect result %x", sha3_256) + } +} |