Module refinery.units.crypto.hash.maru
Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from refinery.lib.maru import maru32digest
from refinery.units.crypto.hash import HashUnit, Arg
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)
Classes
class maru (seed=0, text=False)
-
Returns the 64bit maru hash of the input data.
Expand source code Browse git
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)
Ancestors
Class variables
var required_dependencies
var optional_dependencies
Inherited members