U +¥Mbpã@sLddlmZmZmZddlmZddlmZmZGdd„deƒZ dd„Z d S) é)ÚbordÚis_bytesÚtobytesé)Ú cSHAKE128)Ú _encode_strÚ _right_encodec@s8eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd S) Ú TupleHashz\A Tuple hash object. Do not instantiate directly. Use the :func:`new` function. cCs ||_| d|d¡|_d|_dS)Nós TupleHash)Ú digest_sizeÚ_newÚ_cshakeÚ_digest)ÚselfÚcustomZcshaker ©rú?/tmp/pip-target-t616c12r/lib/python/Crypto/Hash/TupleHash128.pyÚ__init__+szTupleHash.__init__cCs:|jdk rtdƒ‚t|ƒs"tdƒ‚|j tt|ƒƒ¡|S)zŒAuthenticate the next byte string in the tuple. Args: data (bytes/bytearray/memoryview): The next byte string. Nz6You cannot call 'update' after 'digest' or 'hexdigest'z#You can only call 'update' on bytes)rÚ TypeErrorrr Úupdaterr)rÚdatarrrr2s  zTupleHash.updatecCs6|jdkr0|j t|jdƒ¡|j |j¡|_|jS)zŸReturn the **binary** (non-printable) digest of the tuple of byte strings. :return: The hash digest. Binary form. :rtype: byte string Né)rr rrr Úread©rrrrÚdigestCs zTupleHash.digestcCsd dd„t| ¡ƒDƒ¡S)z•Return the **printable** digest of the tuple of byte strings. :return: The hash digest. Hexadecimal encoded. :rtype: string ÚcSsg|]}dt|ƒ‘qS)z%02x)r)Ú.0ÚxrrrÚ Wsz'TupleHash.hexdigest..)ÚjoinÚtuplerrrrrÚ hexdigestPszTupleHash.hexdigestcKs$d|krd|kr|j|d<tf|ŽS)zNReturn a new instance of a TupleHash object. See :func:`new`. Ú digest_bytesÚ digest_bits)r Únew)rÚkwargsrrrr$Ys z TupleHash.newN) Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrr!r$rrrrr %s   r cKs¢| dd¡}| dd¡}d||fkr,tdƒ‚d||fkrs ?