File: README

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (26 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
libminuid - minimalistic globally unique IDs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The library implements non-standard "universally" unique IDs of 18 bytes
in binary. The IDs can be converted forth and back to 24 characters long
(base64 encoded) plain text.

The library is implemented in C89 and does not require any configuration.

The UID consists of a 14 bytes long session ID and a 4 bytes long counter.
The session ID is an unique random number for each session. There must be
a session per process per thread. The counter is incremented on each new
UID generated. When the counter overflows, the session ID is changed.

The random session ID is generated using:
 - /dev/urandom
 - or /dev/random
 - or the current time
 - plus the host application should salt it with unique numbers such
   as the process ID, the thread ID and whatever uniq identifier data it
   has access to.

Salting is a fallback mechanism for systems where /dev/urandom and /dev/random
are not available.

For rationale and design choices, see design.html.