oids: switch from PRNG to random module (#16203)

* switch from PRNG to random module
* fix the regression
* comments + tests
* runnableExamples
* make oids better
This commit is contained in:
flywind 2021-01-07 02:38:31 -06:00 • committed by GitHub
commit 89a21e4ec7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 20 deletions

6
tests/stdlib/toids.nim Normal file
View file

@ -0,0 +1,6 @@
import std/oids
block: # genOid
let x = genOid()
doAssert ($x).len == 24