Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
xmr: mlsag_hasher simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Oct 18, 2018
1 parent feb5f1c commit 111d36d
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/apps/monero/xmr/sub/mlsag_hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ class PreMlsagHasher:
Iterative construction of the pre_mlsag_hash
"""

def __init__(self, state=None):
def __init__(self):
from apps.monero.xmr.sub.keccak_hasher import KeccakXmrArchive

self.is_simple = state[0] if state else None
self.state = state[1] if state else 0
self.kc_master = state[2] if state else crypto.get_keccak()
self.rsig_hasher = state[3] if state else crypto.get_keccak()
self.rtcsig_hasher = None
if state:
self.rtcsig_hasher = KeccakXmrArchive(state[4]) if state[4] else None
else:
self.rtcsig_hasher = KeccakXmrArchive()
self.is_simple = None
self.state = 0
self.kc_master = crypto.get_keccak()
self.rsig_hasher = crypto.get_keccak()
self.rtcsig_hasher = KeccakXmrArchive()

def init(self, is_simple):
if self.state != 0:
Expand Down

0 comments on commit 111d36d

Please sign in to comment.