diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 08:22:19 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 08:22:19 +0800 |
commit | 7625b07dd9a2a7b5c5a504c1276eea04596ac871 (patch) | |
tree | ce2a757cd4e0591fc15815b2dfae528ae517d36e /crypto/key.go | |
parent | 72e2613a9fe3205fa5a67b72b832e03b2357ee88 (diff) | |
parent | 8f504063f465e0ca10c6bb53ee914d10a3d45c86 (diff) | |
download | go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.gz go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.bz2 go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.lz go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.xz go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.zst go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.zip |
Merge branch 'release/0.9.34'v0.9.34
Diffstat (limited to 'crypto/key.go')
-rw-r--r-- | crypto/key.go | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/crypto/key.go b/crypto/key.go index 0b76c43ff..4075afd83 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -35,7 +35,7 @@ import ( ) const ( - version = "1" + version = 3 ) type Key struct { @@ -51,10 +51,17 @@ type plainKeyJSON struct { Address string `json:"address"` PrivateKey string `json:"privatekey"` Id string `json:"id"` - Version string `json:"version"` + Version int `json:"version"` } -type encryptedKeyJSON struct { +type encryptedKeyJSONV3 struct { + Address string `json:"address"` + Crypto cryptoJSON + Id string `json:"id"` + Version int `json:"version"` +} + +type encryptedKeyJSONV1 struct { Address string `json:"address"` Crypto cryptoJSON Id string `json:"id"` @@ -62,13 +69,12 @@ type encryptedKeyJSON struct { } type cryptoJSON struct { - Cipher string `json:"cipher"` - CipherText string `json:"ciphertext"` - CipherParams cipherparamsJSON `json:"cipherparams"` - KDF string `json:"kdf"` - KDFParams scryptParamsJSON `json:"kdfparams"` - MAC string `json:"mac"` - Version string `json:"version"` + Cipher string `json:"cipher"` + CipherText string `json:"ciphertext"` + CipherParams cipherparamsJSON `json:"cipherparams"` + KDF string `json:"kdf"` + KDFParams map[string]interface{} `json:"kdfparams"` + MAC string `json:"mac"` } type cipherparamsJSON struct { |