nl_tokens: @function randomUniqueId
pl_tokens: function randomUniqueId ( ) { // increment count of generated ids randomUniqueId . count ++ // get timestamp var timestamp = microTimestamp ( ) // create unique id randomUniqueId . <mask> = crypto . createHash ( 'sha256' ) // process id, microsec timestamp, and counter . update ( randomUniqueId . processId + randomUniqueId . id + timestamp + randomUniqueId . count ) // get hash as hex . digest ( 'hex' ) // only get 128 bits . substring ( 0 , 32 ) // return object with id and timestamp return { id : randomUniqueId . id , timestamp , } }