mono / dbus-sharp

DBus Sharp
http://mono.github.com/dbus-sharp
MIT License
77 stars 59 forks source link

Uuid generation #16

Closed alanmcgovern closed 7 years ago

alanmcgovern commented 13 years ago

As per commit message, make UUID generation a bit better by removing the requirement for unsafe code and also by removing the (useless) calls to flip endianness on what is essentially just random bytes. It makes no sense :) As the struct is literally (as per dbus spec) supposed to be a unique and random identifier, we don't need the current time to generate it, nor should we use it. System.Random is quite random and using the current time just means we are likely to end up losing 32bits of entopy in our UUID.