moonpyk / ncuid

Collision-resistant ids for .NET (port of https://github.com/dilvie/cuid)
MIT License
36 stars 13 forks source link

Minor refactoring of cuid internals #3

Open dementeddevil opened 5 years ago

dementeddevil commented 5 years ago

Refactored random block generation logic to avoid recreation of Random class. (deals with issue in tracker) Use of Random class is now thread-safe (using thread-local wrapper). Random class is initialised using a cryptographically secure random seed. Fixed potential bug in DateTime usage - uses UtcNow instead of Now. Project file updated to generate .NET Standard 2.0 and .NET 4.6 assemblies.

fabiob commented 5 years ago

@moonpyk, are you still active here? I'm really interested in this PR.

moonpyk commented 5 years ago

@fabiob Yup I'm still active, just back from holidays, I'll try to have a look on your PR ASAP, sorry for the wait