Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
removed reverted change in encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Aug 25, 2016
1 parent e4ceab3 commit 60b5fc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ethcrypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ pub mod ecies {
{
let msgd = &mut msg[1..];
msgd[0..64].copy_from_slice(r.public());
let iv = H128::random();
msgd[64..80].copy_from_slice(&iv);
{
let cipher = &mut msgd[(64 + 16)..(64 + 16 + plain.len())];
aes::encrypt(ekey, &[0u8; 16], plain, cipher);
aes::encrypt(ekey, &iv, plain, cipher);
}
let mut hmac = Hmac::new(Sha256::new(), &mkey);
{
Expand Down

0 comments on commit 60b5fc8

Please sign in to comment.