|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Random Number between 0-86Is there a way to use the
System.Security.Cryptography.RNGCryptoServiceProvider to create a number that is between 0 and 86? -Peter What is the goal ? My first though would be System.Random not knowing what
you are looking for... -- "pmclinn" <pmcl***@gmail.com> a écrit dans le message de news: 1142530494.633202.88***@j33g2000cwa.googlegroups.com...Show quoteHide quote > Is there a way to use the > System.Security.Cryptography.RNGCryptoServiceProvider to create a > number that is between 0 and 86? > > -Peter > Then you could just use "modulus" so that the value is back in the needed
range (for each byte + perhaps adding a constant). If you do this for each byte you'll have a random suite of printable chars. -- Patrice "pmclinn" <pmcl***@gmail.com> a écrit dans le message de news: 1142538072.499744.284***@u72g2000cwu.googlegroups.com...Show quoteHide quote > I'm looking to create a truely random number for a password algorythm. > Peter,
This article shows how to use RNGCryptoServiceProvider to generate random numbers: http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx Kerry Moorman Show quoteHide quote "pmclinn" wrote: > Is there a way to use the > System.Security.Cryptography.RNGCryptoServiceProvider to create a > number that is between 0 and 86? > > -Peter > >
Using AxWebBrowser in VB 2005
Domain search like setting file permissions Text on Image Resolution Reading Stream After RedirectStandardOutput=True Blocks Confusion on Protected Overrides checking for EOF time expressions Loop through columns of all datarows in a dataset my form cannot from from network Problems using HasMorePages with oleDbDatareader |
|||||||||||||||||||||||