Skip to content

Commit 7c0f4a9

Browse files
committed
Merge pull request #3 from Gustav-Simonsson/fix_ecies_params_init_bug
Fix ECIES params nil bug
2 parents 04c1a81 + 5136fc9 commit 7c0f4a9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

params.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,8 @@ type ECIESParams struct {
3636
// * ECIES using AES256 and HMAC-SHA-256-32
3737
// * ECIES using AES256 and HMAC-SHA-384-48
3838
// * ECIES using AES256 and HMAC-SHA-512-64
39-
var (
40-
ECIES_AES128_SHA256 *ECIESParams
41-
ECIES_AES256_SHA256 *ECIESParams
42-
ECIES_AES256_SHA384 *ECIESParams
43-
ECIES_AES256_SHA512 *ECIESParams
44-
)
4539

46-
func init() {
40+
var (
4741
ECIES_AES128_SHA256 = &ECIESParams{
4842
Hash: sha256.New,
4943
hashAlgo: crypto.SHA256,
@@ -75,7 +69,7 @@ func init() {
7569
BlockSize: aes.BlockSize,
7670
KeyLen: 32,
7771
}
78-
}
72+
)
7973

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

0 commit comments

Comments
 (0)