mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-25 17:29:27 +00:00
Merge 9accbda175 into d3edc58ef7
This commit is contained in:
commit
99ba8d1ed2
1 changed files with 4 additions and 1 deletions
|
|
@ -254,9 +254,12 @@ func Encrypt(rand io.Reader, pub *PublicKey, m, s1, s2 []byte) (ct []byte, err e
|
|||
Ke, Km := deriveKeys(hash, z, s1, params.KeyLen)
|
||||
|
||||
em, err := symEncrypt(rand, params, Ke, m)
|
||||
if err != nil || len(em) <= params.BlockSize {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(em) <= params.BlockSize {
|
||||
return nil, ErrInvalidMessage
|
||||
}
|
||||
|
||||
d := messageTag(params.Hash, Km, em, s2)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue