Hi guys,
I'm looking for an algorithm to generate a safe random number like an OTP and I found this code on the web:
const int min = 100000;
const int max = 999999;
const int elemInRange = max - min + 1;
var randomData = new byte[4];
using var rng = new RNGCryptoServiceProvider()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.