Skip to content

Commit

Permalink
Merge pull request ethereum#3 from Gustav-Simonsson/fix_ecies_params_…
Browse files Browse the repository at this point in the history
…init_bug

Fix ECIES params nil bug
  • Loading branch information
obscuren committed Feb 13, 2015
2 parents 04c1a81 + 5136fc9 commit 7c0f4a9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -75,7 +69,7 @@ func init() {
BlockSize: aes.BlockSize,
KeyLen: 32,
}
}
)

var paramsFromCurve = map[elliptic.Curve]*ECIESParams{
elliptic.P256(): ECIES_AES128_SHA256,
Expand Down

0 comments on commit 7c0f4a9

Please sign in to comment.