me._h = me._SHAKE(perso = perso, func = me._FUNC)
## Delegate methods...
- def copy(me): new = me.__class__(); new._copy(me)
+ def copy(me): new = me.__class__._bare_new(); new._copy(me); return new
def _copy(me, other): me._h = other._h.copy()
def hash(me, m): me._h.hash(m); return me
def xof(me): me._h.xof(); return me
def buffered(me): return me._h.buffered
@property
def rate(me): return me._h.rate
+ @classmethod
+ def _bare_new(cls): return cls()
class _tmp:
def check(me, h):
def xof(me):
me.rightenc(0)
return super(KMAC, me).xof()
+ @classmethod
+ def _bare_new(cls): return cls("")
class KMAC128 (KMAC): _SHAKE = Shake128; _TAGSZ = 16
class KMAC256 (KMAC): _SHAKE = Shake256; _TAGSZ = 32