accounts: left pad keybytes-to-encrypt, add 30/31 byte keys tests

This commit is contained in:
Gustav Simonsson
2016-09-23 15:42:29 -04:00
parent 863d166c7b
commit 7cc6b801e0
3 changed files with 62 additions and 1 deletions

View File

@ -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)
}