public static string GetRandomKey(
int minLength,
int maxLength
)
The key is not guaranteed to be unique, but it is extraordinarily unlikely that two keys will be the same. The method uses two different methods to generate random numbers: a weak method, to get the key length, and a strong method to generate the actual key. This increases the likelihood that the key will be unique.
ArgumentException | Thrown if minLength is smaller than MinKeyLength or maxLength is greater than MaxKeyLength. |