diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-02-14 06:42:33 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-02-14 06:42:33 +0800 |
commit | 7c0f4a9b18d992166452d8cd32caaefd92b26386 (patch) | |
tree | 172e17bc69a9003b7e133eb1aefc157218b877a1 | |
parent | 04c1a81509576c898f4d30a76f9d84d087e2a4cf (diff) | |
parent | 5136fc9ab71f77b0741c52b312ca9fdbfb5240c3 (diff) | |
download | dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.tar dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.tar.gz dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.tar.bz2 dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.tar.lz dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.tar.xz dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.tar.zst dexon-7c0f4a9b18d992166452d8cd32caaefd92b26386.zip |
Merge pull request #3 from Gustav-Simonsson/fix_ecies_params_init_bug
Fix ECIES params nil bug
-rw-r--r-- | params.go | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -36,14 +36,8 @@ type ECIESParams struct { // * ECIES using AES256 and HMAC-SHA-256-32 // * ECIES using AES256 and HMAC-SHA-384-48 // * ECIES using AES256 and HMAC-SHA-512-64 -var ( - ECIES_AES128_SHA256 *ECIESParams - ECIES_AES256_SHA256 *ECIESParams - ECIES_AES256_SHA384 *ECIESParams - ECIES_AES256_SHA512 *ECIESParams -) -func init() { +var ( ECIES_AES128_SHA256 = &ECIESParams{ Hash: sha256.New, hashAlgo: crypto.SHA256, @@ -75,7 +69,7 @@ func init() { BlockSize: aes.BlockSize, KeyLen: 32, } -} +) var paramsFromCurve = map[elliptic.Curve]*ECIESParams{ elliptic.P256(): ECIES_AES128_SHA256, |