Skip to content

Commit

Permalink
test_onion.py: drop repeated sha calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ajtowns committed Oct 7, 2015
1 parent beb7020 commit cadaa34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_onion.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def get_ecdh_secrets(cls, sec, pkey_x, pkey_y):

enckey = cls.tweak_sha(sec, b'\x00')[:16]
hmac = cls.tweak_sha(sec, b'\x01')
iv = cls.tweak_sha(sec, b'\x02')[:16]
pad_iv = cls.tweak_sha(sec, b'\x02')[16:]
ivs = cls.tweak_sha(sec, b'\x02')
iv, pad_iv = ivs[:16], ivs[16:]

return enckey, hmac, iv, pad_iv

Expand Down

0 comments on commit cadaa34

Please sign in to comment.