util.uuid API

Fairly often in XMPP you will want to generate pseudo-random, unique identifiers. The uuid library provides this functionality.




Returns an id, in the form of a string.

Note: In Prosody 0.4 and earlier, there was no guarantee that a generated id will actually be unique. In 0.5 and later a string in the UUIDv4 format is returned, however with a dubious PRNG. As of Prosody 0.9.9, /dev/urandom is used as PRNG.