Use ISAAC

This commit is contained in:
Ruslan Mustakov 2016-09-16 01:36:19 +07:00
commit 5f31daada2
3 changed files with 15 additions and 8 deletions

View file

@ -18,8 +18,8 @@ proc `==`*(x, y: UUID): bool
proc genUUID*(): UUID =
## Returns a random (v4) UUID.
## Uses random values obtained from system source (e.g. urandom).
## In the future this will use a cryptographically secure PRNG for efficiency.
## Uses a thread-local cryptographically secure PRNG (ISAAC) seeded with
## true random values obtained from OS.
proc parseUUID*(s: string): UUID {.raises: [ValueError].}
## Converts string representation of an UUID to UUID object.