Re: To create a 12 digit guid?
- From: "JR" <NoMail@xxxxxxxxx>
- Date: Wed, 3 Jan 2007 07:57:29 +0200
Try System.Security.Cryptography.RNGCryptoServiceProvider class
JR
"Michael D. Ober" <obermd.@.alum.mit.edu.no.spam> wrote in message
news:hPEmh.6818$w91.4371@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Take a look at the system.random class. There is a method there that will
fill a byte array with random bytes. As for uniqueness, you'll need to
test for that yourself.
Mike Ober.
<twang090@xxxxxxxxx> wrote in message
news:1167777040.797580.322730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for reply, I really appreciate it.
You are right, what I want is to create a random string that is 12
digit length, it has to be unique and I have no idea on how to do this.
Any idea? Many thanks.
Oliver Sturm wrote:
Hello twang090,
Trying to create a 12 digit "guid", but have no idea on how to, anyone
please have any thought? Thanks in advance.
What do you mean by a 12 digit guid? A guid (see here
http://en.wikipedia.org/wiki/Guid or also here
http://en.wikipedia.org/wiki/UUID) is a 16 byte number that is typically
represented by a sequence of 32 characters, representing the 16 bytes in
hexadecimal notation. Some dashes are thrown in for good measure...
So what is it that you want to create? A 12 character random string?
Oliver Sturm
--
http://www.sturmnet.org/blog
.
- References:
- To create a 12 digit guid?
- From: twang090
- Re: To create a 12 digit guid?
- From: Oliver Sturm
- Re: To create a 12 digit guid?
- From: twang090
- Re: To create a 12 digit guid?
- From: Michael D. Ober
- To create a 12 digit guid?
- Prev by Date: Re: Help trying to login to myspace programatically in vb.net
- Next by Date: Installer Question
- Previous by thread: Re: To create a 12 digit guid?
- Next by thread: Re: To create a 12 digit guid?
- Index(es):
Relevant Pages
|