public void Factory12() { var factory = ChaCha.GetChaCha12Factory(); var seed1 = new Seed(new UInt32[] { 0, 0, 1, 0, 2, 0, 3, 0 }); var rng1 = factory.Create(seed1); Assert.Equal(1488489079u, rng1.NextUInt32()); var rng2 = factory.Create(rng1); Assert.Equal(730709729u, rng2.NextUInt32()); }
public void Factory8() { var factory = ChaCha.GetChaCha8Factory(); var seed1 = new Seed(new UInt32[] { 0, 0, 1, 0, 2, 0, 3, 0 }); var rng1 = factory.Create(seed1); Assert.Equal(3680296248u, rng1.NextUInt32()); var rng2 = factory.Create(rng1); Assert.Equal(421124532u, rng2.NextUInt32()); }
public void Factory20() { var factory = ChaCha.GetChaCha20Factory(); var seed1 = new Seed(new UInt32[] { 0, 0, 1, 0, 2, 0, 3, 0 }); var rng1 = factory.Create(seed1); Assert.Equal(137206642u, rng1.NextUInt32()); var rng2 = factory.Create(rng1); Assert.Equal(1325750369u, rng2.NextUInt32()); }