accounts/keystore, crypto: enforce 256 bit keys on import
This commit is contained in:
@ -74,7 +74,10 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
|
||||
return nil, err
|
||||
}
|
||||
ethPriv := crypto.Keccak256(plainText)
|
||||
ecKey := crypto.ToECDSA(ethPriv)
|
||||
ecKey, err := crypto.ToECDSA(ethPriv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
key = &Key{
|
||||
Id: nil,
|
||||
Address: crypto.PubkeyToAddress(ecKey.PublicKey),
|
||||
|
Reference in New Issue
Block a user