mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
test_onion.py: drop repeated sha calculation
This commit is contained in:
@@ -174,8 +174,8 @@ class Onion(object):
|
|||||||
|
|
||||||
enckey = cls.tweak_sha(sec, b'\x00')[:16]
|
enckey = cls.tweak_sha(sec, b'\x00')[:16]
|
||||||
hmac = cls.tweak_sha(sec, b'\x01')
|
hmac = cls.tweak_sha(sec, b'\x01')
|
||||||
iv = cls.tweak_sha(sec, b'\x02')[:16]
|
ivs = cls.tweak_sha(sec, b'\x02')
|
||||||
pad_iv = cls.tweak_sha(sec, b'\x02')[16:]
|
iv, pad_iv = ivs[:16], ivs[16:]
|
||||||
|
|
||||||
return enckey, hmac, iv, pad_iv
|
return enckey, hmac, iv, pad_iv
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user