aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/key_store_test.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2016-09-24 03:42:29 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2016-09-28 01:07:33 +0800
commit7cc6b801e0967e5ebfa26b9f670675acea6e3a20 (patch)
tree4f27977539b92569659c67751c4d4a209d6af95f /accounts/key_store_test.go
parent863d166c7b0250cf2e99c8aad69578cdd144d386 (diff)
downloaddexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.tar
dexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.tar.gz
dexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.tar.bz2
dexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.tar.lz
dexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.tar.xz
dexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.tar.zst
dexon-7cc6b801e0967e5ebfa26b9f670675acea6e3a20.zip
accounts: left pad keybytes-to-encrypt, add 30/31 byte keys tests
Diffstat (limited to 'accounts/key_store_test.go')
-rw-r--r--accounts/key_store_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/accounts/key_store_test.go b/accounts/key_store_test.go
index b0417c87e..d0713caa0 100644
--- a/accounts/key_store_test.go
+++ b/accounts/key_store_test.go
@@ -239,3 +239,15 @@ func TestKeyForDirectICAP(t *testing.T) {
t.Errorf("Expected first address byte to be zero, have: %s", key.Address.Hex())
}
}
+
+func TestV3_31_Byte_Key(t *testing.T) {
+ t.Parallel()
+ tests := loadKeyStoreTestV3("testdata/v3_test_vector.json", t)
+ testDecryptV3(tests["31_byte_key"], t)
+}
+
+func TestV3_30_Byte_Key(t *testing.T) {
+ t.Parallel()
+ tests := loadKeyStoreTestV3("testdata/v3_test_vector.json", t)
+ testDecryptV3(tests["30_byte_key"], t)
+}