Simon Mourier's Avatar
Simon Mourier's blog (1807 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI3, AOT, P/Invoke, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • c#

Print Unique keys in C#.net

Mar 7, 2011 See the question and my original answer on StackOverflow

Depending on the required key length, instead of using Random (if 'r' points to Random), you could base your random numbers on Guids (for 128-bit keys) or on what provides the RNGCryptoServiceProvider class.

  • SmoBlog © 2010-2026 Simon Mourier. All rights reserved.
  • Privacy & Terms