Skip to content

Commit

Permalink
removes superfluous intermediate class
Browse files Browse the repository at this point in the history
  • Loading branch information
huettenhain committed Jan 24, 2025
1 parent 6be9f85 commit 0d07547
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions refinery/units/crypto/hash/maru.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
from refinery.units.crypto.hash import HashUnit, Arg


class MaruHash(HashUnit, abstract=True):
def __init__(self, seed: Arg.Number(help='optional seed value') = 0, text=False):
super().__init__(seed=seed, text=text)


class maru(MaruHash):
class maru(HashUnit):
"""
Returns the 64bit maru hash of the input data.
"""
def __init__(self, seed: Arg.Number(help='optional seed value') = 0, text=False):
super().__init__(seed=seed, text=text)

def _algorithm(self, data: bytes) -> bytes:
return maru32digest(data, self.args.seed)

0 comments on commit 0d07547

Please sign in to comment.