I am trying to generate random number using RNGCryptoServiceProvider, but some how I am getting o(Zero) in return
private string generatePassword()
{
using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider())
{
string value = string.Empty;
byte[] randomnumber = new byte[10000];
rng.GetBytes(randomnumber);
value = randomnumber.Tostring();
return value;
}
}
Aucun commentaire:
Enregistrer un commentaire