Skip to content

C# library to randomize arbitrary object types via Generics. Add objects to the list, and read them out in a cryptographically strong pseudo-random order.

License

Notifications You must be signed in to change notification settings

mdepaul/RandomizedList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomizedList

C# library to randomize arbitrary object types via Generics. Add objects to the list, and read them out in a cryptographically strong pseudo-random order.

Useage

  public string ShuffleString(StringBuilder sb, IPrng prng)
  {
      RandomizedList<char> rando = new RandomizedList<char>(prng);
      for (int i = 0; i < sb.Length; i++)
      {
          rando.Add(sb[i]);
      }

      sb.Clear();
      foreach (var item in rando)
      {
          sb.Append(item);
      }
      return sb.ToString();
  }

See https://github.com/mdepaul/XRng.git for IPrng useage. It is required to provide the internal randomization functionality of RandomizedList.

About

C# library to randomize arbitrary object types via Generics. Add objects to the list, and read them out in a cryptographically strong pseudo-random order.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages