Skip to content

Commit

Permalink
Use lower case fields in json file (umbracle#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt authored Feb 20, 2022
1 parent 19d7ba3 commit e1982f4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions keystore/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ func aesCTR(key, cipherText, iv []byte) ([]byte, error) {
}

type pbkdf2Params struct {
Dklen int
Salt hexString
C int
Prf string
Dklen int `json:"dklen"`
Salt hexString `json:"salt"`
C int `json:"c"`
Prf string `json:"prf"`
}

func (p *pbkdf2Params) Key(password []byte) []byte {
return pbkdf2.Key(password, p.Salt, p.C, p.Dklen, sha256.New)
}

type scryptParams struct {
Dklen int
Salt hexString
N int
P int
R int
Dklen int `json:"dklen"`
Salt hexString `json:"salt"`
N int `json:"n"`
P int `json:"p"`
R int `json:"r"`
}

func (s *scryptParams) Key(password []byte) ([]byte, error) {
Expand Down

0 comments on commit e1982f4

Please sign in to comment.