aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/crypto_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-01-27 21:29:33 +0800
committerFelix Lange <fjl@twurst.com>2015-02-06 07:00:36 +0800
commit410b35e9135baa86e92bc07e0ef85d04e3ac0561 (patch)
treebb20aca6d2a00af533bb2d0a6c1ee0baf80bff1d /crypto/crypto_test.go
parent2e48d39fc7fc9b8d65e9b6e0ce6863b9374f2233 (diff)
downloaddexon-410b35e9135baa86e92bc07e0ef85d04e3ac0561.tar.gz
dexon-410b35e9135baa86e92bc07e0ef85d04e3ac0561.tar.zst
dexon-410b35e9135baa86e92bc07e0ef85d04e3ac0561.zip
crypto: make it easier to run Sha3 on multiple inputs
crypto.Sha3(append(foo, bar)) --> crypto.Sha3(foo, bar) crypto.Sha3([]byte{}) --> crypto.Sha3()
Diffstat (limited to 'crypto/crypto_test.go')
-rw-r--r--crypto/crypto_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go
index 441733f93..c68856622 100644
--- a/crypto/crypto_test.go
+++ b/crypto/crypto_test.go
@@ -18,7 +18,7 @@ import (
func TestSha3(t *testing.T) {
msg := []byte("abc")
exp, _ := hex.DecodeString("4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45")
- checkhash(t, "Sha3-256", Sha3, msg, exp)
+ checkhash(t, "Sha3-256", func(in []byte) []byte { return Sha3(in) }, msg, exp)
}
func TestSha256(t *testing.T) {