Beispiel #1
0
    def __init__(self):
        self.reseed_count = 0
        self.generator = FortunaGenerator.AESGenerator()
        self.last_reseed = None

        # Initialize 32 FortunaPool instances.
        # NB: This is _not_ equivalent to [FortunaPool()]*32, which would give
        # us 32 references to the _same_ FortunaPool instance (and cause the
        # assertion below to fail).
        self.pools = [FortunaPool() for i in range(32)]     # 32 pools
        assert(self.pools[0] is not self.pools[1])
Beispiel #2
0
 def __init__(self):
     self.reseed_count = 0
     self.generator = FortunaGenerator.AESGenerator()
     self.last_reseed = None
     self.pools = [FortunaPool() for i in range(32)]
     return