@@ -123,6 +123,7 @@ func (ks keyStorePassphrase) StoreKey(filename string, key *Key, auth string) er
123
123
"Please file a ticket at:\n \n " +
124
124
"https://github.com/ethereum/go-ethereum/issues." +
125
125
"The error was : %s"
126
+ //lint:ignore ST1005 This is a message for the user
126
127
return fmt .Errorf (msg , tmpName , err )
127
128
}
128
129
}
@@ -237,7 +238,7 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) {
237
238
238
239
func DecryptDataV3 (cryptoJson CryptoJSON , auth string ) ([]byte , error ) {
239
240
if cryptoJson .Cipher != "aes-128-ctr" {
240
- return nil , fmt .Errorf ("Cipher not supported: %v" , cryptoJson .Cipher )
241
+ return nil , fmt .Errorf ("cipher not supported: %v" , cryptoJson .Cipher )
241
242
}
242
243
mac , err := hex .DecodeString (cryptoJson .MAC )
243
244
if err != nil {
@@ -273,7 +274,7 @@ func DecryptDataV3(cryptoJson CryptoJSON, auth string) ([]byte, error) {
273
274
274
275
func decryptKeyV3 (keyProtected * encryptedKeyJSONV3 , auth string ) (keyBytes []byte , keyId []byte , err error ) {
275
276
if keyProtected .Version != version {
276
- return nil , nil , fmt .Errorf ("Version not supported: %v" , keyProtected .Version )
277
+ return nil , nil , fmt .Errorf ("version not supported: %v" , keyProtected .Version )
277
278
}
278
279
keyId = uuid .Parse (keyProtected .Id )
279
280
plainText , err := DecryptDataV3 (keyProtected .Crypto , auth )
@@ -335,13 +336,13 @@ func getKDFKey(cryptoJSON CryptoJSON, auth string) ([]byte, error) {
335
336
c := ensureInt (cryptoJSON .KDFParams ["c" ])
336
337
prf := cryptoJSON .KDFParams ["prf" ].(string )
337
338
if prf != "hmac-sha256" {
338
- return nil , fmt .Errorf ("Unsupported PBKDF2 PRF: %s" , prf )
339
+ return nil , fmt .Errorf ("unsupported PBKDF2 PRF: %s" , prf )
339
340
}
340
341
key := pbkdf2 .Key (authArray , salt , c , dkLen , sha256 .New )
341
342
return key , nil
342
343
}
343
344
344
- return nil , fmt .Errorf ("Unsupported KDF: %s" , cryptoJSON .KDF )
345
+ return nil , fmt .Errorf ("unsupported KDF: %s" , cryptoJSON .KDF )
345
346
}
346
347
347
348
// TODO: can we do without this when unmarshalling dynamic JSON?
0 commit comments