iota/crypto/signing.py
def _create_sponge(self, index):
        # type: (int) -> Kerl
        """
        Prepares the hash sponge for the generator.
        """
        seed = self.seed_as_trits[:]

        sponge = Kerl()
        sponge.absorb(add_trits(seed, trits_from_int(index)))

        # Squeeze all of the trits out of the sponge and re-absorb them.
        # Note that the sponge transforms several times per operation,
        # so this sequence is not as redundant as it looks at first
        # glance.
        sponge.squeeze(seed)
        sponge.reset()
        sponge.absorb(seed)

        return sponge
def _create_sponge(self, index):
        # type: (int) -> Kerl
        seed = self.seed_as_trits[:]

        sponge = Kerl()
        sponge.absorb(add_trits(seed, trits_from_int(index)))

        # Squeeze all of the trits out of the sponge and re-absorb them.
        # Note that the sponge transforms several times per operation,
        # so this sequence is not as redundant as it looks at first
        # glance.
        sponge.squeeze(seed)
        sponge.reset()
        sponge.absorb(seed)

        return sponge
def _create_sponge ( self , index ) : # type: (int) -> Kerl seed = self . seed_as_trits [ : ] sponge = Kerl ( ) sponge . absorb ( add_trits ( seed , trits_from_int ( index ) ) ) # Squeeze all of the trits out of the sponge and re-absorb them. # Note that the sponge transforms several times per operation, # so this sequence is not as redundant as it looks at first # glance. sponge . squeeze ( seed ) sponge . reset ( ) sponge . absorb ( seed ) return sponge
Prepares the hash sponge for the generator.
Prepares the hash sponge for the generator .