Full Code of danlentz/clj-uuid for AI

master 157f161ecf73 cached
51 files
791.3 KB
243.6k tokens
12 symbols
1 requests
Download .txt
Showing preview only (820K chars total). Download the full file or copy to clipboard to get everything.
Repository: danlentz/clj-uuid
Branch: master
Commit: 157f161ecf73
Files: 51
Total size: 791.3 KB

Directory structure:
gitextract_dgp_2w_6/

├── .github/
│   └── workflows/
│       └── clojure.yml
├── .gitignore
├── CHANGES.md
├── LICENSE
├── README.md
├── deps.edn
├── doc/
│   ├── api/
│   │   ├── clj-uuid.bitmop.html
│   │   ├── clj-uuid.clock.html
│   │   ├── clj-uuid.constants.html
│   │   ├── clj-uuid.core.html
│   │   ├── clj-uuid.html
│   │   ├── clj-uuid.node.html
│   │   ├── clj-uuid.random.html
│   │   ├── clj-uuid.util.html
│   │   ├── css/
│   │   │   ├── default.css
│   │   │   └── highlight.css
│   │   ├── index.html
│   │   └── js/
│   │       └── page_effects.js
│   ├── apples.md
│   ├── draft-peabody-dispatch-new-uuid-format-04.html
│   ├── java-and-unsigned-numbers.html
│   ├── perf-analysis.md
│   ├── rfc4122.txt
│   ├── rfc9562.txt
│   └── uuid-generation-benchmarks.md
├── project.clj
├── src/
│   ├── clj_uuid/
│   │   ├── bitmop.clj
│   │   ├── clock.clj
│   │   ├── constants.clj
│   │   ├── core.clj
│   │   ├── node.clj
│   │   ├── random.clj
│   │   └── util.clj
│   └── clj_uuid.clj
└── test/
    └── clj_uuid/
        ├── api_test.clj
        ├── bench.clj
        ├── bitmop_test.clj
        ├── clock_test.clj
        ├── compare_bench.clj
        ├── core_test.clj
        ├── node_test.clj
        ├── random_test.clj
        ├── util_test.clj
        ├── v1_test.clj
        ├── v3_test.clj
        ├── v4_test.clj
        ├── v5_test.clj
        ├── v6_test.clj
        ├── v7_test.clj
        ├── v7nc_test.clj
        └── v8_test.clj

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/clojure.yml
================================================
name: Clojure CI

on:
  push:
    branches:
      - "*"
  pull_request:
    branches: [ "master" ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Prepare java
      uses: actions/setup-java@v3
      with:
        distribution: 'zulu'
        java-version: '17'

    - name: Install clojure tools
      uses: DeLaGuardo/setup-clojure@13.4
      with:
        # Install just one or all simultaneously
        # The value must indicate a particular version of the tool, or use 'latest'
        # to always provision the latest version
        #        cli: 1.10.1.693              # Clojure CLI based on tools.deps
        lein: 2.11.2                  # Leiningen

    - name: Run tests
      run: lein test


================================================
FILE: .gitignore
================================================
/target
/classes
/checkouts
pom.xml
pom.xml.asc
*.jar
*.class
/.lein-*
.nrepl-port
lpr.sh

test/new.clj
/clj-uuid.iml
/.idea
/.claude
/.lein-failures
/.lein-repl-history
.DS_Store


================================================
FILE: CHANGES.md
================================================
# Changes

## 0.2.5

### Performance

The bitmop layer has been rewritten around ByteBuffer-based primitives
and JVM intrinsics, delivering substantial performance gains across
the board with no changes to the public API.

`mask-offset`, `mask-width`, and `bit-count` now compile to single
hardware instructions (`TZCNT`, `POPCNT`) via `Long/numberOfTrailingZeros`
and `Long/bitCount`, replacing the previous O(n) loops.

A new ByteBuffer abstraction (`uuid->buf`, `buf->uuid`) provides
direct typed access at byte offsets via native `getLong`/`putLong`
operations, eliminating manual shift/mask loops for serialization.

Representative speedups over 0.2.0:

| Category                        | Speedup     |
|---------------------------------|-------------|
| `to-byte-array`                 | **57x**     |
| `to-hex-string`                 | **29x**     |
| v3 (MD5) generation             | **9.0x**    |
| v5 (SHA1) generation            | **6.0x**    |
| v8 (custom) generation          | **4.2x**    |
| v1 (time-based) generation      | **1.5x**    |
| v6 (time-based) generation      | **1.4x**    |

Combined generate + serialize operations see 3-19x end-to-end
improvement depending on UUID version and serialization format.

v3/v5 generation now uses a fused digest pipeline with ThreadLocal
ByteBuffer reuse, `ByteBuffer/wrap` on digest output, and inlined
version/variant bit stamping -- eliminating all intermediate
allocations and var lookups.  v5 is now at parity with JUG 5.2
(~260 ns vs ~254 ns).

### Correctness

- `get-clk-seq` now uses `bitmop/ldb` to extract the 14-bit clock
  sequence directly, fixing incorrect results that occurred when
  Java's `.clockSequence()` method threw on non-v1 UUIDs.

### Clock improvements

- The Gregorian monotonic clock now uses `AtomicLong` with
  `compareAndSet` on a packed long (50-bit millis + 14-bit seqid),
  replacing `atom` + `swap!` + per-call `State` allocation.
- v1 and v6 constructors inline the CAS loop and bit-field packing,
  eliminating var lookup, function dispatch, and `ldb`/`dpb` overhead
  on the hot path.
- The monotonic counter initial state is now seeded with a
  cryptographically random 10-bit value instead of zero, avoiding
  predictable first values after library load.
- Per-tick counter reseed uses 10-bit entropy (was 8-bit).

### New UUID versions

- v6 (reordered time-based, lexically sortable)
- v7 (unix time-based, cryptographically secure, lexically sortable)
- v7nc (unix time-based, non-cryptographic, maximum throughput)
- v8 (custom / user-defined)
- Max UUID sentinel (`+max+`, `max`, `max?`)

`v7nc` uses `ThreadLocalRandom` and a per-thread monotonic counter
instead of `SecureRandom` and a global `AtomicLong`.  At ~39 ns/op,
it is **1.26x faster** than JUG 5.2's `TimeBasedEpochGenerator`
(~50 ns/op).

### New protocol members

- `get-instant` -- returns a `java.util.Date` for time-based UUIDs
- `get-unix-time` -- returns POSIX millis for v1, v6, and v7
- `get-clk-seq` -- returns the 14-bit clock sequence for v1 and v6
- `to-hex-string` -- 32-character hex encoding (no dashes)
- `to-uri` -- returns `java.net.URI` in URN format
- `max?` -- predicate for the max UUID
- `UUIDRfc9562` protocol (with `UUIDRfc4122` as a backward-compatible alias)

### New constructors

- `v0` / `null` -- null UUID constructor
- `max` -- max UUID constructor
- `v4` two-arity form `(v4 msb lsb)` -- stamps version and variant bits onto
  caller-supplied words
- Multi-arity `=`, `<`, `>` comparison operators

### Extended polymorphism

- `as-uuid` now accepts `java.net.URI`, byte arrays, and URN strings
  in addition to canonical UUID strings
- `uuidable?` predicate for testing coercibility

### Build and packaging

- Added `deps.edn` for tools.deps / CLI users
- Removed `.travis.yml`; CI now uses GitHub Actions
- Updated to Clojure 1.12.0 and primitive-math 1.0.1
- Comprehensive test suite: 138 tests, 1.4M+ assertions, 0 failures
- Test coverage: 94% forms, 93% lines (via cloverage)

### Documentation

- README rewritten to cover v6, v7, v8, max UUID, and the new
  performance characteristics
- Typo corrections throughout (`get-timestamp`, `approximately`,
  `associated`, `requirements`, `consciousness`, `alphabetically`,
  `elapsed`, `duplicate`, `construction`)


================================================
FILE: LICENSE
================================================
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

1. DEFINITIONS

"Contribution" means:

a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and

b) in the case of each subsequent Contributor:

i) changes to the Program, and

ii) additions to the Program;

where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from
a Contributor if it was added to the Program by such Contributor itself or
anyone acting on such Contributor's behalf. Contributions do not include
additions to the Program which: (i) are separate modules of software
distributed in conjunction with the Program under their own license
agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents" mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.

"Program" means the Contributions distributed in accordance with this
Agreement.

"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.

2. GRANT OF RIGHTS

a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and
such derivative works, in source code and object code form.

b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under
Licensed Patents to make, use, sell, offer to sell, import and otherwise
transfer the Contribution of such Contributor, if any, in source code and
object code form.  This patent license shall apply to the combination of the
Contribution and the Program if, at the time the Contribution is added by the
Contributor, such addition of the Contribution causes such combination to be
covered by the Licensed Patents. The patent license shall not apply to any
other combinations which include the Contribution. No hardware per se is
licensed hereunder.

c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other
intellectual property rights of any other entity. Each Contributor disclaims
any liability to Recipient for claims brought by any other entity based on
infringement of intellectual property rights or otherwise. As a condition to
exercising the rights and licenses granted hereunder, each Recipient hereby
assumes sole responsibility to secure any other intellectual property rights
needed, if any. For example, if a third party patent license is required to
allow Recipient to distribute the Program, it is Recipient's responsibility
to acquire that license before distributing the Program.

d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license
set forth in this Agreement.

3. REQUIREMENTS

A Contributor may choose to distribute the Program in object code form under
its own license agreement, provided that:

a) it complies with the terms and conditions of this Agreement; and

b) its license agreement:

i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title
and non-infringement, and implied warranties or conditions of merchantability
and fitness for a particular purpose;

ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;

iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and

iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on
or through a medium customarily used for software exchange.

When the Program is made available in source code form:

a) it must be made available under this Agreement; and

b) a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within
the Program.

Each Contributor must identify itself as the originator of its Contribution,
if any, in a manner that reasonably allows subsequent Recipients to identify
the originator of the Contribution.

4. COMMERCIAL DISTRIBUTION

Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a
manner which does not create potential liability for other Contributors.
Therefore, if a Contributor includes the Program in a commercial product
offering, such Contributor ("Commercial Contributor") hereby agrees to defend
and indemnify every other Contributor ("Indemnified Contributor") against any
losses, damages and costs (collectively "Losses") arising from claims,
lawsuits and other legal actions brought by a third party against the
Indemnified Contributor to the extent caused by the acts or omissions of such
Commercial Contributor in connection with its distribution of the Program in
a commercial product offering.  The obligations in this section do not apply
to any claims or Losses relating to any actual or alleged intellectual
property infringement. In order to qualify, an Indemnified Contributor must:
a) promptly notify the Commercial Contributor in writing of such claim, and
b) allow the Commercial Contributor tocontrol, and cooperate with the
Commercial Contributor in, the defense and any related settlement
negotiations. The Indemnified Contributor may participate in any such claim
at its own expense.

For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If
that Commercial Contributor then makes performance claims, or offers
warranties related to Product X, those performance claims and warranties are
such Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a
court requires any other Contributor to pay any damages as a result, the
Commercial Contributor must pay those damages.

5. NO WARRANTY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the
appropriateness of using and distributing the Program and assumes all risks
associated with its exercise of rights under this Agreement , including but
not limited to the risks and costs of program errors, compliance with
applicable laws, damage to or loss of data, programs or equipment, and
unavailability or interruption of operations.

6. DISCLAIMER OF LIABILITY

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.

7. GENERAL

If any provision of this Agreement is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of the
remainder of the terms of this Agreement, and without further action by the
parties hereto, such provision shall be reformed to the minimum extent
necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
(excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted
under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and
does not cure such failure in a reasonable period of time after becoming
aware of such noncompliance. If all Recipient's rights under this Agreement
terminate, Recipient agrees to cease use and distribution of the Program as
soon as reasonably practicable. However, Recipient's obligations under this
Agreement and any licenses granted by Recipient relating to the Program shall
continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to
time. No one other than the Agreement Steward has the right to modify this
Agreement. The Eclipse Foundation is the initial Agreement Steward. The
Eclipse Foundation may assign the responsibility to serve as the Agreement
Steward to a suitable separate entity. Each new version of the Agreement will
be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the
Agreement under which it was received. In addition, after a new version of
the Agreement is published, Contributor may elect to distribute the Program
(including its Contributions) under the new version. Except as expressly
stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
licenses to the intellectual property of any Contributor under this
Agreement, whether expressly, by implication, estoppel or otherwise. All
rights in the Program not expressly granted under this Agreement are
reserved.

This Agreement is governed by the laws of the State of Washington and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial
in any resulting litigation.


================================================
FILE: README.md
================================================
clj-uuid
========

> _"The intent of the UUID is to enable distributed systems to uniquely_
> _identify information without significant central coordination."_
> -- [_Wikipedia/UUID_](http://en.wikipedia.org/wiki/Universally_unique_identifier)

* * * * * *

**clj-uuid** is a Clojure library for generation and utilization of
UUIDs (Universally Unique Identifiers) as described by
[**IETF RFC-9562**](http://www.ietf.org/rfc/rfc9562.txt).

This library extends the standard Java
UUID class to provide true v1, v6, v7 (time based),
v3/v5 (namespace based), and v8 (user customizable)
identifier generation. Additionally, a number of useful
utilities are provided to support serialization and
manipulation of these UUIDs in a simple, efficient manner.

The essential nature of the value RFC-9562 UUIDs provide is that of an
enormous namespace and a deterministic mathematical model by means of
which one navigates it. UUIDs represent an extremely powerful and
versatile computation technique that is often overlooked, and
underutilized. In my opinion, this, in part, is due to the generally
poor quality, performance, and capability of available libraries and,
in part, due to a general misunderstanding in the popular consciousness
of their proper use and benefit. It is my hope that this library will
serve to expand awareness, make available, and simplify the use of standards
compliant UUIDs to a wider audience.

### The Most Recent Release

With Leiningen:


[![Clojars Project](https://img.shields.io/clojars/v/danlentz/clj-uuid.svg)](https://clojars.org/danlentz/clj-uuid)


### What's new?

The latest release focuses on performance.  There are no external
changes to the API.

clj-uuid 0.2.5 now uses ByteBuffer-based primitives and JVM intrinsics
to deliver significant performance gains over traditional shift/mask
loop approach.

| Category                      | Speedup     |
|-------------------------------|-------------|
| `to-byte-array`               | **57x**     |
| `to-hex-string`               | **29x**     |
| v3 (MD5) generation           | **9.0x**    |
| v5 (SHA1) generation          | **6.0x**    |
| v8 (custom) generation        | **4.2x**    |
| v1 (time-based) generation    | **1.5x**    |
| v6 (time-based) generation    | **1.4x**    |

v5 generation is now at parity with JUG 5.2 (~260 ns vs ~254 ns)
thanks to a fused digest pipeline with ThreadLocal ByteBuffer reuse.

A new `v7nc` constructor provides non-cryptographic v7 UUIDs at
**~39 ns** -- **1.26x faster** than JUG's `TimeBasedEpochGenerator`
(~50 ns).

Combined generate + serialize operations see **3-19x** end-to-end
improvement depending on UUID version and serialization format.

For detailed benchmarks and further analysis, see:

* [Performance Analysis](doc/perf-analysis.md) -- architectural analysis
  of bitmop (old) vs bitmop2 (new) primitives
* [Benchmarks](doc/uuid-generation-benchmarks.md) -- per-version timings, throughput, and combined operation benchmarks
* [Competitive Benchmarks](doc/apples.md) -- head-to-head comparison with JUG, uuid-creator, and JDK


### Why is this library useful??

The JVM version only provides an automatic generator for random (v4)
and (non-namespaced) pseudo-v3 UUID's.  Where appropriate, this library
does use the internal JVM UUID implementation.  The benefit with this library
is that clj-uuid provides an easy way to get fast time-based (v1, v6),
true namespaced (v3, v5), and high quality cryptographcically secure
time-based (v7) UUIDs.

### But wait, why so many choices?

Each version of UUID offers advantages in particular situations. Please
read on to learn more, but, to help put you at ease, your decision on
which is appropriate to use will usually be clear.

v1, v6, and v7nc time-encoded UUIDs are useful because they can be generated
much more quickly than other forms of UUID, as there is no need to
call a cryptographic random number generator.  v7nc is the fastest at ~39 ns.

v3/v5 deternibistic UUID's are necessary because many of the interesting
things that you can do with UUID's require stable, reproducable,
namespaced identifiers.

v7's combine time encoding, secure cryptogrsphy, lexical ordering, and
index-friendliness to provide a premium UUID experience, but at some
additional cost to produce.

### How Big?

The provided namespace represents an _inexhaustable_ resource and as
such can be used in a variety of ways not feasible using traditional
techniques rooted in the notions imposed by finite resources.  When I
say "inexhaustable" this of course is slight hyperbolie, but not by
much.  The upper bound on the representation implemented by this
library limits the number of unique identifiers to a mere...

*three hundred forty undecillion two hundred eighty-two decillion three*
*hundred sixty-six nonillion nine hundred twenty octillion nine hundred*
*thirty-eight septillion four hundred sixty-three sextillion four hundred*
*sixty-three quintillion three hundred seventy-four quadrillion six hundred*
*seven trillion four hundred thirty-one billion seven hundred sixty-eight*
*million two hundred eleven thousand four hundred and fifty-five.*

If you think you might be starting to run low, let me know when you get down
to your last few undecillion or so and I'll see what I can do to help out.

### Usage

Using clj-uuid is really easy.  Docstrings are provided, but sometimes
examples help, too.  The following cases demonstrate about 90% of the
functionality that you are likely to ever need.

In order to refer to the symbols in this library, it is recommended to
*require* it in a given namespace:

```clojure

(require '[clj-uuid.core :as uuid])
```

Or include in namespace declaration:

```clojure

(ns foo
  (:require [clj-uuid.core :as uuid])
  ...
  )

```

The legacy single-segment namespace `clj-uuid` is still supported for
backward compatibility:

```clojure

(require '[clj-uuid :as uuid])  ;; also works
```

#### Literal Syntax

UUID's have a convenient literal syntax supported by the clojure
reader.  The tag `#uuid` denotes that the following string literal
will be read as a UUID.  UUID's evaluate to themselves, similarly to
Clojure keywords.

```clojure

user> #uuid "e6ff478d-9492-48dd-886d-23ec4c6385ee"

;;  => #uuid "e6ff478d-9492-48dd-886d-23ec4c6385ee"
```


#### The NULL Identifier

The special UUID, `#uuid "00000000-0000-0000-0000-000000000000"` is
known as the _**null** UUID_ or _version 0 UUID_ and can be useful for
representing special values such as _nil_ or _null-context_. One may
reference the null UUID declaratively or functionally, although it is
best to pick one convention and remain consistant. When comparing UUID's
the NULL UUID is considered the MININUM VALUE.


```clojure

user> (uuid/null)

;;  => #uuid "00000000-0000-0000-0000-000000000000"

user> uuid/+null+

;;  => #uuid "00000000-0000-0000-0000-000000000000"

```


#### The MAX Identifier

The special UUID, `#uuid "ffffffff-ffff-ffff-ffff-ffffffffffff"` is
known as the _**max** UUID_ and is used similarly to the _**null** UUID_.  When
comparing UUID's the NULL UUID is considered the MAXIMUM VALUE.


```clojure

user> (uuid/max)

;;  => #uuid "ffffffff-ffff-ffff-ffff-ffffffffffff"

user> uuid/+max+

;;  => #uuid "ffffffff-ffff-ffff-ffff-ffffffffffff"

```

#### v6/v1: Fast, Time Encoded Identifiers

You can make your own v1 and v6 UUID's at home with the functions
`uuid/v1` and `uuid/v6`.  These are fast to produce (~100 ns) and guarantee
to be unique and thread-safe regardless of clock precision or degree of
concurrency, but each with slightly different characteristics:

A v6 UUID encodes both the time and a random node identifier that is
reset each time the library is loaded.  They are fast, lexically
(alphabetically) ordered, and index-friendly.

A v1 UUID is similar, but may reveal both the identity of the computer
that generated the UUID and the time at which it did so.  Its uniqueness
across computers is guaranteed as long as node/MAC addresses are not
duplicated. In general, other than for legacy compatibility, the use
case for this would be for situations where it is useful to know the
provenance of any given UUID.  It does not provide lexical ordering or
index-friendliness.


```clojure

(uuid/v6)

;; => #uuid "1ef7b36c-4ca7-6df0-91a1-233a797d04c0"
;; => #uuid "1ef7b36c-9c4c-60e0-91a1-233a797d04c0"
;; => #uuid "1ef7b373-1c84-6180-91a1-233a797d04c0"


(uuid/v1)

;; => #uuid "ffa803f0-b3d3-11e4-a03e-3af93c3de9ae"
;; => #uuid "005b7570-b3d4-11e4-a03e-3af93c3de9ae"
;; => #uuid "018a0a60-b3d4-11e4-a03e-3af93c3de9ae"
```

v7nc is the fastest UUID generator at ~39 ns, followed by v1 and v6 at ~100 ns,
all significantly faster than the JVM's `java.util.UUID/randomUUID` (~345 ns):


```
user> (criterium.core/bench (uuid/v7nc))

;; Execution time mean : 39.412000 ns

user> (criterium.core/bench (uuid/v6))

;; Execution time mean : 100.764073 ns

user> (criterium/bench (java.util.UUID/randomUUID))

;; Execution time mean : 344.654110 ns

```

##### Sequential (Temporal) Namespace

v6 and v1 UUID's retrievably encode the time of their creation.  The
native representation of this timestamp is as a 60 bit value indicating
the number of 100 nanosecond intervals since the Gregorian epoch (for
the younger readers, this was at 12am Friday October 15, 1582 UTC).


```clojure

user> (uuid/get-timestamp (uuid/v6))

;;  => 136459064897650000


user> (map uuid/get-timestamp (repeatedly 10 uuid/v1))

;;  => (136459065592300000
;;      136459065592310000
;;      136459065592320000
;;      136459065592340000
;;      136459065592340001 <-+ subcounter ensures unique timestamp
;;      136459065592350000   | even when the resolution of the
;;      136459065592350001 <-+ system clock is insufficiently
;;      136459065592370000   | granular to provide uniqueness.
;;      136459065592370001 <-+
;;      136459065592380000)
```

Clearly, that is pretty useful.  We can look at any two time-based
UUID's and compare their timestamps relative to one another.  We can
also look at the absolute timestamp values of time-based UUID's using the
ideomatic Clojure representation of timestamp values:


```clojure

user> (uuid/get-instant (uuid/v1))

;;  => #inst "2015-03-17T17:51:15.970-00:00"


user> (map uuid/get-instant (repeatedly 10 uuid/v1))

;;  => (#inst "2015-03-17T17:51:53.800-00:00" <-+ Note, however,
;;      #inst "2015-03-17T17:51:53.800-00:00" <-+ insufficient clock precision
;;      #inst "2015-03-17T17:51:53.802-00:00"   | to distinguish betweem
;;      #inst "2015-03-17T17:51:53.803-00:00" <-+ absolute timestamp values
;;      #inst "2015-03-17T17:51:53.803-00:00" <-+
;;      #inst "2015-03-17T17:51:53.804-00:00"
;;      #inst "2015-03-17T17:51:53.807-00:00"
;;      #inst "2015-03-17T17:51:53.808-00:00"
;;      #inst "2015-03-17T17:51:53.812-00:00"
;;      #inst "2015-03-17T17:51:53.814-00:00")
```


#### v4: Random Identifiers

V4 identifiers are generated by directly invoking the static method
`java.util.UUID/randomUUID` and are, in typical situations, slower to
generate in addition to being non-deterministically unique. It exists
primarily because it is very simple to implement and because randomly
generated UUID's are hard to guess.  They can be useful in that case,
for example to seed a UUID namespace as we will see in a later example.

```clojure

user> (uuid/v4)

;; => #uuid "49c248c3-d232-4960-b2f4-fd5a3a72ea62"
```


#### v7: Time Encoded Cryptographically Random Identifiers

Combining some of the best features of all of the above, v7 UUIDs
provide time encoding, lexical ordering, and entropy-friendly
randomness, at, of course, some additional cost to compute.


```clojure

user> (uuid/v7)

;; => #uuid "0192292b-c52c-7058-bdf8-741af201c7d3"

user> (uuid/get-timestamp (uuid/v7))

;; => 1727267644205  (note -- POSIX time!)

user> (uuid/get-instant (uuid/v7))

;; => #inst "2024-09-25T12:34:57.981-00:00"


user> (criterium.core/bench (uuid/v7))

;; Execution time mean : 333.232000 ns

```

If cryptographic unguessability of the random portion is not required,
`v7nc` provides the same v7 UUID structure using `ThreadLocalRandom`
instead of `SecureRandom`:

```clojure

user> (uuid/v7nc)

;; => #uuid "0194cba3-f2d1-7a4c-8b1e-6c3a9d8e4f21"

user> (criterium.core/bench (uuid/v7nc))

;; Execution time mean : 39.412000 ns

```

#### Lexical Comparability

Ok, you've heard me mention "lexical ordering" a few times. What does
this mean?  v6 and v7 UUIDs offer identifiers that can be efficiently
ordered alphabetically, requiring no decoding, based on the order of
their creation. Let's take an example:

```clojure

user> (def x (uuid/v7))

;; => #uuid "0192293c-8640-7058-9106-b97bf1754d98"

user> (def y (uuid/v7))

;; => #uuid "0192293c-a931-709d-afba-5ad27082a4b6"

user> (get-instant x)

;; => #inst "2024-09-25T12:51:25.376-00:00"

user> (get-instant y)

;; => #inst "2024-09-25T12:51:34.321-00:00"

```

As you can see, it is always possible to order time encoded ids by
parsing them, but v6 and v7 UUIDs make this easier, on any platform,
even if you don't have your trusty clj-uuid library available.


```clojure
user> (uuid/= x y)

;; => false

user> (uuid/< x y)

;; => true

user> (clojure.core/compare (str x) (str y))

;; => -41  (negative -- ie, "less than")

user> (clojure.core/compare (str y) (str x))

;; =>  41  (positive -- ie  "greater than")


```

#### v3/v5: Namespaced Identifiers

First of all, the only difference between v3 and v5 UUID's is that v3's
are computed using an MD5 digest algorithm and v5's are computed using SHA1.
It is generally considered that SHA1 is a superior hash, but MD5 is
computationally less expensive and so v3 may be preferred in
situations requiring slightly faster performance. As such, when we give
examples of namespaced identifiers, we will typically just use `v5` with
the understanding that `v3` could be used identically in each case.

##### Namespaces

If you are familiar with Clojure _vars_, you already understand the
idea of _namespaced_ identifiers.  To resolve the value of a var, one
needs to know not only the _name_ of a var, but also the _namespace_
it resides in.  It is intuitively clear that vars `#'user/x` and
`#'library/x` are distinct.  Namespaced UUID's follow a similar
concept, however namespaces are themselves represented as UUID's.
Names are strings that encode a representation of a symbol or value in
the namespace of that identifier.  Given a namespace and a local-name,
one can always (re)construct the unique identifier that represents
it.  We can demonstrate a few examples constructed using several of
the canonical top level namespace UUIDs:

```clojure

user> (uuid/v5 uuid/+namespace-url+ "http://example.com/")

;;  => #uuid "0a300ee9-f9e4-5697-a51a-efc7fafaba67"

user> (uuid/v5 uuid/+namespace-x500+ "http://example.com/")

;;  => #uuid "0cb29677-4eaf-578f-ab9b-f9ac67c33cb9"


user> (uuid/v3 uuid/+namespace-dns+ "www.clojure.org")

;;  => #uuid "3bdca4f7-fc85-3a8b-9038-7626457527b0"


user> (uuid/v5 uuid/+namespace-oid+ "0.1.22.13.8.236.1")

;;  => #uuid "9989a7d2-b7fc-5b6a-84d6-556b0531a065"
```

You can see in each case that the local "name" string is given in some
well-definted format specific to each namespace.  This is a very
common convention, but not enforced.  It is perfectly valid to
construct a namespaced UUID from any literal string.

```clojure

user> (uuid/v5 uuid/+namespace-url+ "I am clearly not a URL")

;;  => #uuid "a167a791-e550-57ae-b20f-666ee47ce7c1"
```

As a matter of fact, the requirements for a valid the local-part
constituent are even more general than even just Strings.  Any kind of
object will do:

```clojure

user> (uuid/v5 uuid/+namespace-url+ :keyword)

;;  => #uuid "bc480d53-fba7-5e5f-8f33-6ad77880a007"

user> (uuid/v5 uuid/+namespace-url+ :keyword)

;;  => #uuid "bc480d53-fba7-5e5f-8f33-6ad77880a007"

user> (uuid/v5 uuid/+namespace-oid+ :keyword)

;;  => #uuid "9b3d8a3d-fadf-55b5-811f-12a0c50c3e86"



user> (uuid/v5 uuid/+null+ 'this-symbol)

;;  => #uuid "8b2941d5-e40b-5364-afcf-0008833715a2"

user> (uuid/v5 uuid/+null+ 'this-symbol)

;;  => #uuid "8b2941d5-e40b-5364-afcf-0008833715a2"


```

This will be most efficient for classes of object that have been
extended with the `UUIDNameBytes` protocol.  If one intends to do such
a thing fequently, it is a simple matter to specialize an
`as-byte-array` method which can extract a byte serialization that
represents the 'name' of an object, typically unique within some given
namespace.  Here is a simple example where one adds specialized support
for URLs to be quickly digested as the bytes of their string representation.


```clojure

(extend-protocol UUIDNameBytes java.net.URL
  (as-byte-array [this]
    (.getBytes (.toString this) StandardCharsets/UTF_8)))


(uuid/v5 uuid/+namespace-url+ "http://example.com/")

;; => #uuid "0a300ee9-f9e4-5697-a51a-efc7fafaba67"


(uuid/v5 uuid/+namespace-url+ (java.net.URL. "http://example.com/"))

;; => #uuid "0a300ee9-f9e4-5697-a51a-efc7fafaba67"

```


##### Hierarchical Namespace

Because each UUID denotes its own namespace, it is easy to compose v5
identifiers in order to represent hierarchical sub-namespaces.  This,
for example, can be used to assign unique identifiers based not only
on the content of a string but the unique identity representing its
source or provenance:

```clojure

user> (uuid/v5
        (uuid/v5 uuid/+namespace-url+ "http://example.com/")
        "resource1#")

;;  => #uuid "6a3944a4-f00e-5921-b8b6-2cea5a745132"


user> (uuid/v5
        (uuid/v5 uuid/+namespace-url+ "http://example.com/")
        "resource2#")

;;  => #uuid "98879e2a-8511-59ab-877d-ac6f8667866d"


user> (uuid/v5
        (uuid/v5 uuid/+namespace-url+ "http://other.com/")
        "resource1#")

;;  => #uuid "bc956d0c-7af3-5b81-89f2-a96e8f9fd1a8"


user> (uuid/v5
        (uuid/v5 uuid/+namespace-url+ "http://other.com/")
        "resource2#")

;;  => #uuid "a38b24fe-7ab8-58c8-a3f8-d3adb308260b"


```

Because UUID's and namespaces can be chained together like this, one
can be certain that the UUID resulting from a chain of calls such as
the following will be unique -- if and only if the original namespace
matches:


```clojure

user> (-> (uuid/v1)
        (uuid/v5 "one")
        (uuid/v5 "two")
        (uuid/v5 "three"))

;;  => #uuid "eb7a0c2b-eb0e-5bb2-9819-3c9edc2814fa"


user> (-> (uuid/v1)
        (uuid/v5 "one")
        (uuid/v5 "two")
        (uuid/v5 "three"))

;;  => #uuid "45e8c272-1660-57ba-8892-6844e1d3196a"

```


At each step, the local part string must be identical, in order for the the
final UUID to match:

```clojure

user> (-> uuid/+namespace-dns+
        (uuid/v5 "one")
        (uuid/v5 "two")
        (uuid/v5 "three"))

;;  => #uuid "617756cc-3b02-5a86-ad4a-ab3e1403dbd6"


user> (-> uuid/+namespace-dns+
        (uuid/v5 "two")
        (uuid/v5 "one")
        (uuid/v5 "three"))

;;  => #uuid "52d5453e-2aa1-53c1-b093-0ea20ef57ad1"

```

This capability can be used to represent uniqueness of a sequence of
computations in, for example, a transaction system such as the one
used in the graph-object database system
[de.setf.resource](http://github.com/lisp/de.setf.resource/) or this
interesting new [CQRS/ES Server](http://yuppiechef.github.io/cqrs-server/).

### A Simple Example

Ok, so now you know how to use this nifty new UUID library and you are
burning up to do something awesome with UUID's... But, ah, hmmm... First
you need to figure out what exactly you want to do with them.  Well,
before you start working on your distributed cloud-based secret
weapon, here is a simple way you can generate cryptographically
secure activation keys for your draconian licensing scheme.

First, we pick a secret key.  We might pick a time-based id, or we might
begin with some secret namespace, secret identifier pair to compute that
initial namespace deterministically.  This is convenient, but not necessary
-- the time-based or random private key could also be stored in some form
of persistent memory.  As unguessability important to deter hackers, we will
choose a random namespace and record it in some secret, persistent storage
to ensure we can regenerate a user's activation code identically on-demand
in the future.

```clojure

user> (def +secret-weapon-licensing-namespace+ (uuid/v4))


user> (uuid/v5 +secret-weapon-licensing-namespace+ "joe@example.com")

;;  => #uuid "b6433d1e-d369-5282-8dbc-bdd3845c376c"


user> (uuid/v5 +secret-weapon-licensing-namespace+ "mom@knitting-arts.edu")

;;  => #uuid "81e4708c-85bb-5f3c-be56-bba4d8b0ac91"

```

Now, as the orders start rolling in for your product, you can crank out
secret weapon activation codes just as well as if you were Microsoft.
Each one will be keyed to a user's email address and is guaranteed
to be irreversible.  You will infuriate them with unreasonably high
maintence support contract fees and intractible licensing terms.
You truly are diabolical.


### Basic API

* * * * * *

#### Namespaces

_(var)_         `+null+`

> `#uuid "00000000-0000-0000-0000-000000000000"`

_(var)_         `+max+`

> `#uuid "ffffffff-ffff-ffff-ffff-ffffffffffff"`


_(var)_         `+namespace-dns+`

> `#uuid "6ba7b810-9dad-11d1-80b4-00c04fd430c8"`


_(var)_         `+namespace-url+`

> `#uuid "6ba7b811-9dad-11d1-80b4-00c04fd430c8"`


_(var)_         `+namespace-oid+`

> `#uuid "6ba7b812-9dad-11d1-80b4-00c04fd430c8"`


_(var)_         `+namespace-x500+`

> `#uuid "6ba7b814-9dad-11d1-80b4-00c04fd430c8"`

* * * * * *

#### Generators

_(function)_    `null []`

> Return the null UUID, a special form of sentinel UUID that is specified to have
> all 128 bits set to zero: #uuid "00000000-0000-0000-0000-000000000000"

_(function)_    `max []`

> Return the max UUID, a special form of sentinel UUID that is specified to have
> all 128 bits set to one: "#uuid "ffffffff-ffff-ffff-ffff-ffffffffffff"

_(function)_    `v1 []`

> Generate a v1 (time-based) unique identifier, guaranteed to be unique
> and thread-safe regardless of clock precision or degree of concurrency.
> Creation of v1 UUID's does not require any call to a cryptographic
> generator and can be accomplished much more efficiently than v3, v4, v5, v7,
> or squuid's.  A v1 UUID reveals both the identity of the computer that
> generated the UUID and the time at which it did so.  Its uniqueness across
> computers is guaranteed as long as MAC addresses are not duplicated.

_(function)_    `v3 [^UUID namespace ^Object local-name]`

>  Generate a v3 (name based, MD5 hash) UUID. context' must be UUIDable.
>  v3 identifiers are intended for generating UUID's from names that are
>  drawn from, and unique within, some namespace.  The concept of name and
>  namespace should be broadly construed, and not limited to textual names.
>  The requirements for a v3 UUID are as follows:
>
>  * v3 UUID's generated at different times from the same name in the same
>    namespace MUST be equal.
>
>  * v3 UUID's generated from two different names in the same namespace
>    SHOULD be distinct with a high degree of certainty.
>
>  * v3 UUID's generated from the same name in two different namespaces
>    SHOULD be distinct with a high degree of certainty.
>
>  * If two v3 UUID's are equal, then there is a high degree of certainty
>    that they were generated from the same name in the same namespace.

_(function)_    `v4 []`

_(function)_    `v4 [^long msb, ^long lsb]`

>  Generate a v4 (random) UUID.  Uses default JVM implementation.  If two
>  arguments, lsb and msb (both long) are provided, then construct a valid,
>  properly formatted v4 UUID based on those values.  So, for example the
>  following UUID, created from all zero bits, is indeed distinct from the
>  null UUID:
>
>      (v4)
>       => #uuid "dcf0035f-ea29-4d1c-b52e-4ea499c6323e"
>
>      (v4 0 0)
>       => #uuid "00000000-0000-4000-8000-000000000000"
>
>      (null)
>       => #uuid "00000000-0000-0000-0000-000000000000"


_(function)_    `v5 [^UUID namespace ^Object local-name]`

>  Generate a v5 (name based, SHA1 hash) UUID. 'context' must be UUIDable.
>  v5 identifiers are intended for generating UUID's from names that are
>  drawn from, and unique within, some namespace.  The concept of name and
>  namespace should be broadly construed, and not limited to textual names.
>  The requirements for a v5 UUID are as follows:
>
>  * v5 UUID's generated at different times from the same name in the same
>    namespace MUST be equal.
>
>  * v5 UUID's generated from two different names in the same namespace
>    SHOULD be distinct with a high degree of certainty.
>
>  * v5 UUID's generated from the same name in two different namespaces
>    SHOULD be distinct with a high degree of certainty.
>
>  * If two v5 UUID's are equal, then there is a high degree of certainty
>    that they were generated from the same name in the same namespace.

_(function)_    `v6 []`

> Generate a v6 (time-based), LEXICALLY SORTABLE, unique identifier,
> v6 is a field-compatible version of v1, reordered for improved DB
> locality.  Creation of v6 UUID's does not require any call to a
> cryptographic generator and can be accomplished much more efficiently
> than v3, v4, v5, v7, or squuid's.  A v6 UUID uses a cryptographically
> secure, hard to guess random node id. It DOES NOT reveal the identity
> of the computer on which it was created.

_(function)_    `v7 []`

>  Generate a v7 unix time-based, LEXICALLY SORTABLE UUID with monotonic
>  counter, cryptographically secure random portion, and POSIX time encoding.
>  As such, creation of v7 UUIDs may be slower, but have improved
>  entropy chararacteristics compared to v1 or v6 UUIDs.

_(function)_    `v7nc []`

>  Generate a v7 UUID using non-cryptographic randomness (ThreadLocalRandom).
>  Same timestamp/version/variant structure as v7, but uses a per-thread
>  monotonic counter and ThreadLocalRandom instead of SecureRandom and a
>  global AtomicLong.  At ~39 ns, this is faster than JUG 5.2's v7
>  generator (~50 ns).  Use when cryptographic unguessability of the
>  random portion is not required.

_(function)_    `v8 [^long msb, ^long lsb]`

> Generate a v8 custom UUID with up to 122 bits of user data.

_(function)_    `squuid []`

>  Generate a SQUUID (sequential, random) unique identifier.  SQUUID's
>  are a nonstandard variation on v4 (random) UUIDs that have the
>  desirable property that they increase sequentially over time as well
>  as encode retrievably the posix time at which they were generated.
>  Splits and reassembles a v4 UUID to merge current POSIX
>  time (seconds since 12:00am January 1, 1970 UTC) with the most
>  significant 32 bits of the UUID

_(function)_    `= [x]`

_(function)_    `= [x y]`

_(function)_    `= [x y & more]`

> Directly compare two or more UUIDs for = relation based on the
> ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
> EQUIVALENCE].

_(function)_    `> [x]`

_(function)_    `> [x y]`

_(function)_    `> [x y & more]`

> Directly compare two or more UUIDs for > relation based on the
> ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
> EQUIVALENCE].

_(function)_    `< [x]`

_(function)_    `< [x y]`

_(function)_    `< [x y & more]`

> Directly compare two or more UUIDs for < relation based on the
> ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
> EQUIVALENCE].

_(function)_    `monotonic-time []`

>  Return a monotonic timestamp (guaranteed always increasing)  based on
>  the number of 100-nanosecond intervals elapsed since the adoption of the
>  Gregorian calendar in the West, 12:00am Friday October 15, 1582 UTC.

* * * * * *

#### Protocols

_(protocol)_    `UUIDNameBytes`

>  A mechanism intended for user-level extension that defines the
>  decoding rules for the local-part representation of arbitrary
>  Clojure / Java Objects when used for computing namespaced
>  identifiers.
>
> _(member)_    `as-byte-array [self]`
>
>>  Extract a byte serialization that represents the 'name' of x,
>>  typically unique within a given namespace.


_(protocol)_    `UUIDable`

>  A UUIDable object directly represents a UUID.  Examples of things which
>  might be conceptually 'uuidable' include string representation of a
>  UUID in canonical hex format, or an appropriate URN URI.
>
> _(member)_    `as-uuid [self]`
>
>>  Coerce the value of `self` to a java.util.UUID.
>
> _(member)_    `uuidable? [self]`
>
>>  Return 'true' if `self` can be coerced to UUID.


_(protocol)_    `UUIDRfc4122`

> Aliases UUIDRfc9526

_(protocol)_    `UUIDRfc9526`

>  A protocol that abstracts an unique identifier as described by
>  IETF RFC9526 <http://www.ietf.org/rfc/rfc9526.txt>. A UUID
>  represents a 128-bit value, however there are variant encoding
>  layouts used to assign and interpret information encoded in
>  those bits.  This is a protocol for  _variant 2_ (*Leach-Salz*)
>  UUID's.
>
> _(member)_    `null? [self]`
>
>>  Return `true` only if `self` has all 128 bits set ot zero and is
>>  therefore equal to the null UUID, `00000000-0000-0000-0000-000000000000`.
>
> _(member)_    `uuid? [self]`
>
>>  Return `true` if the class of `self` implements an RFC9526 unique identifier.
>
> _(member)_    `uuid= [self other]`
>
>>  Directly compare two UUID's for `=` relation based on the equality
>>  semantics defined by [RFC4122:3 "RULES FOR LEXICAL EQUIVALENCE"].
>
> _(member)_    `uuid< [self other]`
>
>>  Directly compare two UUID's for `<` relation based on the ordinality
>>  semantics defined by [RFC4122:3 "RULES FOR LEXICAL EQUIVALENCE"].
>
> _(member)_    `uuid> [self other]`
>
>>  Directly compare two UUID's for `>` relation based on the ordinality
>>  semantics defined by [RFC4122:3 "RULES FOR LEXICAL EQUIVALENCE"].
>
> _(member)_    `get-word-high [self]`
>
>>  Return the most significant 64 bits of the 128 bit value of UUID `self`.
>
> _(member)_    `get-word-low [self]`
>
>>  Return the least significant 64 bits of the 128 bit value of UUID `self`.
>
> _(member)_    `get-variant [self]`
>
>>  Return the _variant_ number associated with this UUID.  The variant field
>>  contains a value which identifies the layout of the UUID.  The bit-layout
>>  implemented by this protocol supports UUID's with a variant value of 0x2,
>>  which indicates Leach-Salz layout.  Defined UUID variant values are:
>>
>>     0x0   Null
>>     0x2   Leach-Salz
>>     0x6   Microsoft
>>     0x7   Max
>>
>>  In the canonical representation, `xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx`,
>>  the most significant bits of N indicate the variant (depending on the
>>  variant one, two, or three bits are used). The variant covered by RFC4122
>>  is indicated by the two most significant bits of `N` being `1 0` (i.e., the
>>  hexadecimal `N` will always be `8`, `9`, `A`, or `B`).
>
> _(member)_    `get-version [self]`
>
>>  Return the _version_ number associated with this UUID.  The version
>>  field contains a value which describes the nature of the UUID.  There
>>  are five versions of Leach-Salz UUID, plus the null and max UUIDs:
>>
>>     0x0   Null
>>     0x1   Time based
>>     0x2   DCE security with POSIX UID
>>     0x3   Namespaced, deterministic (MD5 Digest)
>>     0x4   Cryptographic random
>>     0x5   Namespaced, deterministic (SHA1 Digest)
>>     0x6   Time based, lexically ordered
>>     0x7   POSIX Time based, lexically ordered, cryptographically secure
>>     0x8   User Customizable
>>     0xF   Max
>>
>>  In the canonical representation, xxxxxxxx-xxxx-Mxxx-xxxx-xxxxxxxxxxxx,
>>  the four bits of M indicate the UUID version (i.e., the hexadecimal M
>>  will be either 1, 2, 3, 4, 5, 6, 7, or 8).")
>
> _(member)_    `get-timestamp [self]`
>
>>  Return the time of UUID creation.  For Gregorian time-based (v1,
>>  v6) UUID's, this is 60 bit unsigned value that represents a
>>  temporally unique timestamp associated with this UUID.  The result
>>  encodes the number of 100 nanosecond intervals since the adoption of
>>  the Gregorian calendar.  For v7 UUID's this encodes the more common
>>  unix time in milliseconds since midnight, January 1, 1970 UTC.  For
>>  non-time-based (v3, v4, v5, v8, squuid) UUID's, always returns
>>  `nil`.
>
> _(member)_    `get-instant [self]`
>
>>  For time-based (v1, v6, v7) UUID's, return a `java.util.Date` object
>>  that represents the system time at which this UUID was
>>  generated. NOTE: the returned value may not necessarily be
>>  temporally unique. For non-time-based (v3, v4, v5, squuid) UUID's,
>>  always returns `nil`.
>
> _(member)_    `get-unix-time [self]`
>
>>  For time-based (v1, v6, v7) UUIDs return the timestamp portion in
>>  approximately milliseconds since the Unix epoch 1970-01-01T00:00:00.000Z.
>>  For non-time-based (v3, v4, v5, v8, squuid) UUID's, always returns
>`nil`.
>
> _(member)_    `get-time-low [self]`
>
>>  Return the 32 bit unsigned value that represents the _time-low_ field
>>  of the _timestamp_ associated with this UUID.
>
> _(member)_    `get-time-mid [self]`
>
>>  Return the 16 bit unsigned value that represents the _time-mid_ field
>>  of the _timestamp_ associated with this UUID.
>
> _(member)_    `get-time-high [self]`
>
>>  Return the 16 bit unsigned value that represents the _time-high_ field
>>  of the _timestamp_ multiplexed with the _version_ of this UUID.
>
> _(member)_    `get-clk-seq [self]`
>
>>  Return the _clk-seq_ number associated with this UUID. For
>>  time-based (v1, v6) UUID's the _clock-sequence_ value is a somewhat
>>  counter-intuitively named seed-value that is used to reduce the
>>  potential that duplicate UUID's might be generated under unusual
>>  situations, such as if the system hardware clock is set backward in
>>  time or if, despite all efforts otherwise, a duplicate `+node-id+`
>>  happens to be generated. This value is initialized to a random
>>  16-bit number once per lifetime of the system.  For non-time-based
>>  (v3, v4, v5, squuid) UUID's, always returns `nil`.
>
> _(member)_    `get-clk-high [self]`
>
>>  Return the 8 bit unsigned value that represents the most significant
>>  byte of the _clk-seq_ multiplexed with the _variant_ of this UUID.
>
> _(member)_    `get-clk-low [self]`
>
>>  Return the 8 bit unsigned value that represents the least significant
>>  byte of the _clk-seq_ associated with this UUID.
>
> _(member)_    `get-node-id [self]`
>
>>  Return the 48 bit unsigned value that represents the spatially unique
>>  _node identifier_ associated with this UUID.
>
> _(member)_    `hash-code [self]`
>
>>  Return a suitable 64-bit hash value for `self`.  Extend for
>>  specialized hash computation.
>
> _(member)_    `to-byte-array [self]`
>
>>  Return an array of 16 bytes that represents `self` as a decomposed
>>  octet serialization encoded in most-significant-byte first order.
>
> _(member)_    `to-string [self]`
>
>>  Return a String object that represents `self` in the canonical
>>  36 character hexadecimal string format:
>>
>>     "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
>
> _(member)_    `to-hex-string [self]`
>
>>  Return a String object that represents `self` as the 32 hexadecimal
>>  characters directly encodong the UUID's 128 bit value:
>>
>>     "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
>
> _(member)_    `to-urn-string [self]`
>
>>  Return a String object that represents `uuid` as a the string
>>  serialization of the URN URI based on the canonical 36 character
>>  hex-string representation:
>>
>>     "urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
>
> _(member)_    `to-uri [self]`
>
>>  Return the unique URN URI associated with this UUID.


### References

* [IETF RFC-9562](http://www.ietf.org/rfc/rfc9562.txt) _Universally Unique IDentifiers (UUIDs)_

* [IETF RFC-4122](http://www.ietf.org/rfc/rfc4122.txt) _A Universally Unique IDentifier (UUID) URN Namespace_

* [Wikipedia/_Universally unique identifier_](http://en.wikipedia.org/wiki/Universally_unique_identifier)

* [CL-UUID](http://www.dardoria.net/software/uuid.html) reference implementation

* [UNICLY](https://github.com/mon-key/unicly) reference implementation

* [java.util.UUID](http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html) JavaDoc

* [Java and Unsigned Primitive Datatypes](http://www.darksleep.com/player/JavaAndUnsignedTypes.html)

* [The web of names, hashes, and UUIDs](http://joearms.github.io/2015/03/12/The_web_of_names.html)

* [Coding Katas Clojure -- Bloom Filters](http://blog.find-method.de/index.php?/archives/200-Coding-katas-Clojure-Bloom-filters.html)


### Special Thanks

![YourKit](https://www.yourkit.com/images/yklogo.png)

YourKit supports open source projects with its full-featured Java Profiler.
YourKit, LLC is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/index.jsp)
and [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/index.jsp),
    innovative and intelligent tools for profiling Java and .NET
applications.


### License

Copyright © 2024 Dan Lentz

Distributed under the Eclipse Public License version 1.0


================================================
FILE: deps.edn
================================================
{:paths ["src"]
 :deps  {org.clojure/clojure {:mvn/version "1.12.0"}
         org.clj-commons/primitive-math {:mvn/version "1.0.1"}}
 :aliases
 {:test {:extra-paths ["test"]}
  :coverage {:extra-paths ["test"]
             :extra-deps {cloverage/cloverage {:mvn/version "1.2.4"}}
             :main-opts ["-m" "cloverage.coverage"
                         "--src-ns-path" "src"
                         "--test-ns-path" "test"]}}}


================================================
FILE: doc/api/clj-uuid.bitmop.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.bitmop documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch current"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.bitmop.html#var-assemble-bytes"><div class="inner"><span>assemble-bytes</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-bit-count"><div class="inner"><span>bit-count</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buf-.3Ebytes"><div class="inner"><span>buf-&gt;bytes</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buf-.3Euuid"><div class="inner"><span>buf-&gt;uuid</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buf-compare"><div class="inner"><span>buf-compare</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buf-hex"><div class="inner"><span>buf-hex</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buf-str"><div class="inner"><span>buf-str</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buffer"><div class="inner"><span>buffer</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-buffer-from-bytes"><div class="inner"><span>buffer-from-bytes</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-bytes-.3Elong"><div class="inner"><span>bytes-&gt;long</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-dpb"><div class="inner"><span>dpb</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-dpb-buf"><div class="inner"><span>dpb-buf</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-duplicate"><div class="inner"><span>duplicate</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-expt2"><div class="inner"><span>expt2</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-get-byte"><div class="inner"><span>get-byte</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-get-int"><div class="inner"><span>get-int</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-get-long"><div class="inner"><span>get-long</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-get-lsb"><div class="inner"><span>get-lsb</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-get-msb"><div class="inner"><span>get-msb</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-get-short"><div class="inner"><span>get-short</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-hex"><div class="inner"><span>hex</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-hex-.3Ebuf"><div class="inner"><span>hex-&gt;buf</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ldb"><div class="inner"><span>ldb</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ldb-buf"><div class="inner"><span>ldb-buf</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-long-.3Ebytes"><div class="inner"><span>long-&gt;bytes</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-mask"><div class="inner"><span>mask</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-mask-offset"><div class="inner"><span>mask-offset</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-mask-width"><div class="inner"><span>mask-width</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-octet-hex"><div class="inner"><span>octet-hex</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-pphex"><div class="inner"><span>pphex</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-put-byte"><div class="inner"><span>put-byte</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-put-int"><div class="inner"><span>put-int</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-put-long"><div class="inner"><span>put-long</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-put-short"><div class="inner"><span>put-short</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-sb16"><div class="inner"><span>sb16</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-sb32"><div class="inner"><span>sb32</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-sb64"><div class="inner"><span>sb64</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-sb8"><div class="inner"><span>sb8</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-set-lsb"><div class="inner"><span>set-lsb</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-set-msb"><div class="inner"><span>set-msb</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub16"><div class="inner"><span>ub16</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub24"><div class="inner"><span>ub24</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub32"><div class="inner"><span>ub32</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub4"><div class="inner"><span>ub4</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub48"><div class="inner"><span>ub48</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub56"><div class="inner"><span>ub56</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-ub8"><div class="inner"><span>ub8</span></div></a></li><li class="depth-1"><a href="clj-uuid.bitmop.html#var-uuid-.3Ebuf"><div class="inner"><span>uuid-&gt;buf</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.bitmop</h1><div class="doc"><pre class="plaintext">Unsigned Long and ByteBuffer-based bitwise operation primitives for
UUID manipulation.

Provides the same mask/ldb/dpb fundamentals as in the past, plus a
16-byte ByteBuffer abstraction for direct UUID byte manipulation.

The ByteBuffer approach has two key advantages:

1. Performance: ByteBuffer provides direct typed access at byte offsets
   via single native operations (getLong, getInt, etc.) rather than
   manual shift/mask loops.
2. Portability: The buffer abstraction maps naturally to JavaScript's
   DataView/ArrayBuffer, enabling a future cljc implementation.</pre></div><div class="public anchor" id="var-assemble-bytes"><h3>assemble-bytes</h3><div class="usage"><code>(assemble-bytes v)</code></div><div class="doc"><pre class="plaintext">Assemble a sequence of 8 bytes (big-endian) into a long.
</pre></div></div><div class="public anchor" id="var-bit-count"><h3>bit-count</h3><div class="usage"><code>(bit-count x)</code></div><div class="doc"><pre class="plaintext">Count the number of set bits in `x`.
</pre></div></div><div class="public anchor" id="var-buf-.3Ebytes"><h3>buf-&gt;bytes</h3><div class="usage"><code>(buf-&gt;bytes buf)</code></div><div class="doc"><pre class="plaintext">Extract the contents of a 16-byte UUID buffer as a byte array.
</pre></div></div><div class="public anchor" id="var-buf-.3Euuid"><h3>buf-&gt;uuid</h3><div class="usage"><code>(buf-&gt;uuid buf)</code></div><div class="doc"><pre class="plaintext">Convert a 16-byte UUID buffer to a java.util.UUID.
</pre></div></div><div class="public anchor" id="var-buf-compare"><h3>buf-compare</h3><div class="usage"><code>(buf-compare a b)</code></div><div class="doc"><pre class="plaintext">Lexicographic unsigned comparison of two 16-byte UUID buffers.
Returns negative if a &lt; b, zero if equal, positive if a &gt; b.
Comparison is unsigned (treats bytes as 0-255) which matches UUID
canonical string ordering.</pre></div></div><div class="public anchor" id="var-buf-hex"><h3>buf-hex</h3><div class="usage"><code>(buf-hex buf)</code></div><div class="doc"><pre class="plaintext">Convert a 16-byte UUID buffer to a 32-character hex string.
</pre></div></div><div class="public anchor" id="var-buf-str"><h3>buf-str</h3><div class="usage"><code>(buf-str buf)</code></div><div class="doc"><pre class="plaintext">Convert a 16-byte UUID buffer to the canonical 36-character UUID string:
  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Byte ranges correspond to UUID fields:
  bytes 0-3:   time-low
  bytes 4-5:   time-mid
  bytes 6-7:   time-high-and-version
  bytes 8-9:   clock-seq
  bytes 10-15: node</pre></div></div><div class="public anchor" id="var-buffer"><h3>buffer</h3><div class="usage"><code>(buffer)</code><code>(buffer msb lsb)</code></div><div class="doc"><pre class="plaintext">Create a 16-byte big-endian ByteBuffer.

0-arity:  zeroed buffer
2-arity:  from msb and lsb longs
The buffer uses absolute (position-independent) get/put operations.</pre></div></div><div class="public anchor" id="var-buffer-from-bytes"><h3>buffer-from-bytes</h3><div class="usage"><code>(buffer-from-bytes arr)</code></div><div class="doc"><pre class="plaintext">Create a 16-byte ByteBuffer from a byte array (at least 16 bytes).
</pre></div></div><div class="public anchor" id="var-bytes-.3Elong"><h3>bytes-&gt;long</h3><div class="usage"><code>(bytes-&gt;long arr i)</code></div><div class="doc"><pre class="plaintext">Read 8 bytes from `arr` starting at offset `i`, returning a long.
</pre></div></div><div class="public anchor" id="var-dpb"><h3>dpb</h3><div class="usage"><code>(dpb bitmask num value)</code></div><div class="doc"><pre class="plaintext">Deposit Byte -- insert `value` into the bit field defined by `bitmask`
within `num`.</pre></div></div><div class="public anchor" id="var-dpb-buf"><h3>dpb-buf</h3><div class="usage"><code>(dpb-buf buf word-offset bitmask value)</code></div><div class="doc"><pre class="plaintext">Deposit bit field: insert `value` into the bits defined by `bitmask`
within the 64-bit word at `word-offset` in the buffer.  Mutates and
returns the buffer.</pre></div></div><div class="public anchor" id="var-duplicate"><h3>duplicate</h3><div class="usage"><code>(duplicate buf)</code></div><div class="doc"><pre class="plaintext">Create an independent copy of a UUID buffer.
</pre></div></div><div class="public anchor" id="var-expt2"><h3>expt2</h3><div class="usage"><code>(expt2 pow)</code></div><div class="doc"><pre class="plaintext">Compute 2^pow using bit-set.
</pre></div></div><div class="public anchor" id="var-get-byte"><h3>get-byte</h3><div class="usage"><code>(get-byte buf offset)</code></div><div class="doc"><pre class="plaintext">Read an unsigned byte (0-255) at byte offset from buffer.
</pre></div></div><div class="public anchor" id="var-get-int"><h3>get-int</h3><div class="usage"><code>(get-int buf offset)</code></div><div class="doc"><pre class="plaintext">Read an unsigned 32-bit value at byte offset from buffer.
</pre></div></div><div class="public anchor" id="var-get-long"><h3>get-long</h3><div class="usage"><code>(get-long buf offset)</code></div><div class="doc"><pre class="plaintext">Read a 64-bit long at byte offset from buffer.
</pre></div></div><div class="public anchor" id="var-get-lsb"><h3>get-lsb</h3><div class="usage"><code>(get-lsb buf)</code></div><div class="doc"><pre class="plaintext">Read the least significant 64 bits (bytes 8-15) of a UUID buffer.
</pre></div></div><div class="public anchor" id="var-get-msb"><h3>get-msb</h3><div class="usage"><code>(get-msb buf)</code></div><div class="doc"><pre class="plaintext">Read the most significant 64 bits (bytes 0-7) of a UUID buffer.
</pre></div></div><div class="public anchor" id="var-get-short"><h3>get-short</h3><div class="usage"><code>(get-short buf offset)</code></div><div class="doc"><pre class="plaintext">Read an unsigned 16-bit value at byte offset from buffer.
</pre></div></div><div class="public anchor" id="var-hex"><h3>hex</h3><div class="usage"><code>(hex thing)</code></div><div class="doc"><pre class="plaintext">Convert a long or byte sequence to a hex string.
For a long, produces a 16-character zero-padded hex string.</pre></div></div><div class="public anchor" id="var-hex-.3Ebuf"><h3>hex-&gt;buf</h3><div class="usage"><code>(hex-&gt;buf s)</code></div><div class="doc"><pre class="plaintext">Parse a 32-character hex string into a 16-byte UUID buffer.
</pre></div></div><div class="public anchor" id="var-ldb"><h3>ldb</h3><div class="usage"><code>(ldb bitmask num)</code></div><div class="doc"><pre class="plaintext">Load Byte -- extract the bit field defined by `bitmask` from `num`.
</pre></div></div><div class="public anchor" id="var-ldb-buf"><h3>ldb-buf</h3><div class="usage"><code>(ldb-buf buf word-offset bitmask)</code></div><div class="doc"><pre class="plaintext">Load bit field: extract bits defined by `bitmask` from the 64-bit word
at `word-offset` in the buffer.</pre></div></div><div class="public anchor" id="var-long-.3Ebytes"><h3>long-&gt;bytes</h3><div class="usage"><code>(long-&gt;bytes x)</code><code>(long-&gt;bytes x arr i)</code></div><div class="doc"><pre class="plaintext">Write `x` as 8 big-endian bytes.  With one argument returns a new byte
array.  With three arguments writes into `arr` at offset `i`.</pre></div></div><div class="public anchor" id="var-mask"><h3>mask</h3><div class="usage"><code>(mask width offset)</code></div><div class="doc"><pre class="plaintext">Create a bitmask of `width` bits starting at bit `offset`.
</pre></div></div><div class="public anchor" id="var-mask-offset"><h3>mask-offset</h3><div class="usage"><code>(mask-offset m)</code></div><div class="doc"><pre class="plaintext">Return the bit offset (position of least significant set bit) of a mask.
</pre></div></div><div class="public anchor" id="var-mask-width"><h3>mask-width</h3><div class="usage"><code>(mask-width m)</code></div><div class="doc"><pre class="plaintext">Return the number of set bits in a contiguous bitmask.
</pre></div></div><div class="public anchor" id="var-octet-hex"><h3>octet-hex</h3><div class="usage"><code>(octet-hex num)</code></div><div class="doc"><pre class="plaintext">Convert a single byte value to a two-character uppercase hex string.
</pre></div></div><div class="public anchor" id="var-pphex"><h3>pphex</h3><div class="usage"><code>(pphex x)</code></div><div class="doc"><pre class="plaintext">Pretty-print a long value in both hexadecimal and binary.
</pre></div></div><div class="public anchor" id="var-put-byte"><h3>put-byte</h3><div class="usage"><code>(put-byte buf offset val)</code></div><div class="doc"><pre class="plaintext">Write a byte value at byte offset in buffer.  Returns the buffer.
</pre></div></div><div class="public anchor" id="var-put-int"><h3>put-int</h3><div class="usage"><code>(put-int buf offset val)</code></div><div class="doc"><pre class="plaintext">Write a 32-bit value at byte offset in buffer.  Returns the buffer.
</pre></div></div><div class="public anchor" id="var-put-long"><h3>put-long</h3><div class="usage"><code>(put-long buf offset val)</code></div><div class="doc"><pre class="plaintext">Write a 64-bit long at byte offset in buffer.  Returns the buffer.
</pre></div></div><div class="public anchor" id="var-put-short"><h3>put-short</h3><div class="usage"><code>(put-short buf offset val)</code></div><div class="doc"><pre class="plaintext">Write a 16-bit value at byte offset in buffer.  Returns the buffer.
</pre></div></div><div class="public anchor" id="var-sb16"><h3>sb16</h3><div class="usage"><code>(sb16 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-sb32"><h3>sb32</h3><div class="usage"><code>(sb32 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-sb64"><h3>sb64</h3><div class="usage"><code>(sb64 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-sb8"><h3>sb8</h3><div class="usage"><code>(sb8 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-lsb"><h3>set-lsb</h3><div class="usage"><code>(set-lsb buf val)</code></div><div class="doc"><pre class="plaintext">Set the least significant 64 bits (bytes 8-15) of a UUID buffer.
Returns the buffer.</pre></div></div><div class="public anchor" id="var-set-msb"><h3>set-msb</h3><div class="usage"><code>(set-msb buf val)</code></div><div class="doc"><pre class="plaintext">Set the most significant 64 bits (bytes 0-7) of a UUID buffer.
Returns the buffer.</pre></div></div><div class="public anchor" id="var-ub16"><h3>ub16</h3><div class="usage"><code>(ub16 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-ub24"><h3>ub24</h3><div class="usage"><code>(ub24 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-ub32"><h3>ub32</h3><div class="usage"><code>(ub32 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-ub4"><h3>ub4</h3><div class="usage"><code>(ub4 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-ub48"><h3>ub48</h3><div class="usage"><code>(ub48 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-ub56"><h3>ub56</h3><div class="usage"><code>(ub56 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-ub8"><h3>ub8</h3><div class="usage"><code>(ub8 num)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid-.3Ebuf"><h3>uuid-&gt;buf</h3><div class="usage"><code>(uuid-&gt;buf uuid)</code></div><div class="doc"><pre class="plaintext">Convert a java.util.UUID to a 16-byte ByteBuffer.
</pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.clock.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.clock documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch current"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.clock.html#var-.2Brandom-counter-resolution.2B"><div class="inner"><span>+random-counter-resolution+</span></div></a></li><li class="depth-1"><a href="clj-uuid.clock.html#var-.2Bsubcounter-resolution.2B"><div class="inner"><span>+subcounter-resolution+</span></div></a></li><li class="depth-1"><a href="clj-uuid.clock.html#var--gregorian-packed-"><div class="inner"><span>-gregorian-packed-</span></div></a></li><li class="depth-1"><a href="clj-uuid.clock.html#var-monotonic-time"><div class="inner"><span>monotonic-time</span></div></a></li><li class="depth-1"><a href="clj-uuid.clock.html#var-monotonic-unix-time-and-random-counter"><div class="inner"><span>monotonic-unix-time-and-random-counter</span></div></a></li><li class="depth-1"><a href="clj-uuid.clock.html#var-posix-time"><div class="inner"><span>posix-time</span></div></a></li><li class="depth-1"><a href="clj-uuid.clock.html#var-universal-time"><div class="inner"><span>universal-time</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.clock</h1><div class="doc"><pre class="plaintext">Lock-Free, Thread-safe Monotonic Clocks
</pre></div><div class="public anchor" id="var-.2Brandom-counter-resolution.2B"><h3>+random-counter-resolution+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bsubcounter-resolution.2B"><h3>+subcounter-resolution+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var--gregorian-packed-"><h3>-gregorian-packed-</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-monotonic-time"><h3>monotonic-time</h3><div class="usage"><code>(monotonic-time)</code></div><div class="doc"><pre class="plaintext">Generate a guaranteed monotonically increasing timestamp based on
Gregorian time and a stateful subcounter</pre></div></div><div class="public anchor" id="var-monotonic-unix-time-and-random-counter"><h3>monotonic-unix-time-and-random-counter</h3><div class="usage"><code>(monotonic-unix-time-and-random-counter)</code></div><div class="doc"><pre class="plaintext">Generate guaranteed monotonically increasing number pairs based on
POSIX time and a randomly seeded subcounter</pre></div></div><div class="public anchor" id="var-posix-time"><h3>posix-time</h3><div class="usage"><code>(posix-time)</code><code>(posix-time gregorian)</code></div><div class="doc"><pre class="plaintext">Generate the (Unix compatible) POSIX time -- the number of seconds
that have elapsed since 00:00 January 1, 1970 UTC</pre></div></div><div class="public anchor" id="var-universal-time"><h3>universal-time</h3><div class="usage"><code>(universal-time)</code><code>(universal-time gregorian)</code></div><div class="doc"><pre class="plaintext">Generate the (Common-Lisp compatible) universal-time -- the number of
seconds that have elapsed since 00:00 January 1, 1900 GMT</pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.constants.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.constants documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch current"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bhex-chars.2B"><div class="inner"><span>+hex-chars+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bmd5.2B"><div class="inner"><span>+md5+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bsha1.2B"><div class="inner"><span>+sha1+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub1-mask.2B"><div class="inner"><span>+ub1-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub12-mask.2B"><div class="inner"><span>+ub12-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub16-mask.2B"><div class="inner"><span>+ub16-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub24-mask.2B"><div class="inner"><span>+ub24-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub32-mask.2B"><div class="inner"><span>+ub32-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub4-mask.2B"><div class="inner"><span>+ub4-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub40-mask.2B"><div class="inner"><span>+ub40-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub48-mask.2B"><div class="inner"><span>+ub48-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub56-mask.2B"><div class="inner"><span>+ub56-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub60-mask.2B"><div class="inner"><span>+ub60-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub63-mask.2B"><div class="inner"><span>+ub63-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-.2Bub8-mask.2B"><div class="inner"><span>+ub8-mask+</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-hex-regex"><div class="inner"><span>hex-regex</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-urn-regex"><div class="inner"><span>urn-regex</span></div></a></li><li class="depth-1"><a href="clj-uuid.constants.html#var-uuid-regex"><div class="inner"><span>uuid-regex</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.constants</h1><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-.2Bhex-chars.2B"><h3>+hex-chars+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bmd5.2B"><h3>+md5+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bsha1.2B"><h3>+sha1+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub1-mask.2B"><h3>+ub1-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub12-mask.2B"><h3>+ub12-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub16-mask.2B"><h3>+ub16-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub24-mask.2B"><h3>+ub24-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub32-mask.2B"><h3>+ub32-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub4-mask.2B"><h3>+ub4-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub40-mask.2B"><h3>+ub40-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub48-mask.2B"><h3>+ub48-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub56-mask.2B"><h3>+ub56-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub60-mask.2B"><h3>+ub60-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub63-mask.2B"><h3>+ub63-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bub8-mask.2B"><h3>+ub8-mask+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-hex-regex"><h3>hex-regex</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-urn-regex"><h3>urn-regex</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid-regex"><h3>uuid-regex</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.core.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.core documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch current"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.core.html#var-.2Bmax.2B"><div class="inner"><span>+max+</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.2Bnamespace-dns.2B"><div class="inner"><span>+namespace-dns+</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.2Bnamespace-oid.2B"><div class="inner"><span>+namespace-oid+</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.2Bnamespace-url.2B"><div class="inner"><span>+namespace-url+</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.2Bnamespace-x500.2B"><div class="inner"><span>+namespace-x500+</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.2Bnull.2B"><div class="inner"><span>+null+</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.3C"><div class="inner"><span>&lt;</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.3D"><div class="inner"><span>=</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-.3E"><div class="inner"><span>&gt;</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-max"><div class="inner"><span>max</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-monotonic-time"><div class="inner"><span>monotonic-time</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-null"><div class="inner"><span>null</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-squuid"><div class="inner"><span>squuid</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-uuid-string.3F"><div class="inner"><span>uuid-string?</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-uuid-urn-string.3F"><div class="inner"><span>uuid-urn-string?</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-uuid-vec.3F"><div class="inner"><span>uuid-vec?</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-UUIDable"><div class="inner"><span>UUIDable</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-as-uuid"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>as-uuid</span></div></a></li><li class="depth-2"><a href="clj-uuid.core.html#var-uuidable.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>uuidable?</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-UUIDNameBytes"><div class="inner"><span>UUIDNameBytes</span></div></a></li><li class="depth-2"><a href="clj-uuid.core.html#var-as-byte-array"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>as-byte-array</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-UUIDRfc4122"><div class="inner"><span>UUIDRfc4122</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-UUIDRfc9562"><div class="inner"><span>UUIDRfc9562</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-clk-high"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-clk-high</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-clk-low"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-clk-low</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-clk-seq"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-clk-seq</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-instant"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-instant</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-node-id"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-node-id</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-time-high"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-time-high</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-time-low"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-time-low</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-time-mid"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-time-mid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-timestamp"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-timestamp</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-unix-time"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-unix-time</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-variant"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-variant</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-version"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-version</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-word-high"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-word-high</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-get-word-low"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-word-low</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-hash-code"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>hash-code</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-max.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>max?</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-null.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>null?</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-to-byte-array"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-byte-array</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-to-hex-string"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-hex-string</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-to-string"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-string</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-to-uri"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-uri</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-to-urn-string"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>to-urn-string</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-uuid.3C"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>uuid&lt;</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-uuid.3D"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>uuid=</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html#var-uuid.3E"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>uuid&gt;</span></div></a></li><li class="depth-2"><a href="clj-uuid.core.html#var-uuid.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>uuid?</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v0"><div class="inner"><span>v0</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v1"><div class="inner"><span>v1</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v3"><div class="inner"><span>v3</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v4"><div class="inner"><span>v4</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v5"><div class="inner"><span>v5</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v6"><div class="inner"><span>v6</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v7"><div class="inner"><span>v7</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v7nc"><div class="inner"><span>v7nc</span></div></a></li><li class="depth-1"><a href="clj-uuid.core.html#var-v8"><div class="inner"><span>v8</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.core</h1><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-.2Bmax.2B"><h3>+max+</h3><div class="usage"></div><div class="doc"><pre class="plaintext">The MAX UUID is a special form of sentinel UUID that is specified to have
all 128 bits set to one.</pre></div></div><div class="public anchor" id="var-.2Bnamespace-dns.2B"><h3>+namespace-dns+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnamespace-oid.2B"><h3>+namespace-oid+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnamespace-url.2B"><h3>+namespace-url+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnamespace-x500.2B"><h3>+namespace-x500+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnull.2B"><h3>+null+</h3><div class="usage"></div><div class="doc"><pre class="plaintext">The NULL UUID is a special form of sentinel UUID that is specified to have
all 128 bits set to zero.</pre></div></div><div class="public anchor" id="var-.3C"><h3>&lt;</h3><div class="usage"><code>(&lt; _)</code><code>(&lt; x y)</code><code>(&lt; x y &amp; more)</code></div><div class="doc"><pre class="plaintext">Directly compare two or more UUIDs for &lt; relation based on the
ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
EQUIVALENCE].</pre></div></div><div class="public anchor" id="var-.3D"><h3>=</h3><div class="usage"><code>(= _)</code><code>(= x y)</code><code>(= x y &amp; more)</code></div><div class="doc"><pre class="plaintext">Directly compare two or more UUIDs for = relation based on the
equality semantics defined by [RFC4122:3 RULES FOR LEXICAL
EQUIVALENCE].</pre></div></div><div class="public anchor" id="var-.3E"><h3>&gt;</h3><div class="usage"><code>(&gt; _)</code><code>(&gt; x y)</code><code>(&gt; x y &amp; more)</code></div><div class="doc"><pre class="plaintext">Directly compare two or more UUIDs for &gt; relation based on the
ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
EQUIVALENCE].</pre></div></div><div class="public anchor" id="var-max"><h3>max</h3><div class="usage"><code>(max)</code></div><div class="doc"><pre class="plaintext">Generates the v15 (maximum) UUID, ffffffff-ffff-ffff-ffff-ffffffffffff.
</pre></div></div><div class="public anchor" id="var-monotonic-time"><h3>monotonic-time</h3><div class="usage"><code>(monotonic-time)</code></div><div class="doc"><pre class="plaintext">Return a monotonic timestamp (guaranteed always increasing) based on
the number of 100-nanosecond intervals elapsed since the adoption of
the Gregorian calendar in the West, 12:00am Friday October 15, 1582 UTC.</pre></div></div><div class="public anchor" id="var-null"><h3>null</h3><div class="usage"><code>(null)</code></div><div class="doc"><pre class="plaintext">Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.
</pre></div></div><div class="public anchor" id="var-squuid"><h3>squuid</h3><div class="usage"><code>(squuid)</code></div><div class="doc"><pre class="plaintext">Generate a SQUUID (sequential, random) unique identifier.  SQUUID's
are a nonstandard variation on v4 (random) UUIDs that have the
desirable property that they increase sequentially over time as well
as encode retrievably the posix time at which they were generated.
Splits and reassembles a v4 UUID to merge current POSIX
time (seconds since 12:00am January 1, 1970 UTC) with the most
significant 32 bits of the UUID.</pre></div></div><div class="public anchor" id="var-uuid-string.3F"><h3>uuid-string?</h3><div class="usage"><code>(uuid-string? str)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid-urn-string.3F"><h3>uuid-urn-string?</h3><div class="usage"><code>(uuid-urn-string? str)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid-vec.3F"><h3>uuid-vec?</h3><div class="usage"><code>(uuid-vec? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-UUIDable"><h3>UUIDable</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A UUIDable object directly represents a UUID.  Examples of things which
might be conceptually 'uuidable' include string representation of a
UUID in canonical hex format, or an appropriate URN URI.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-as-uuid"><h3>as-uuid</h3><div class="usage"><code>(as-uuid x)</code></div><div class="doc"><pre class="plaintext">Coerce the value 'x' to a UUID.
</pre></div></div><div class="public anchor" id="var-uuidable.3F"><h3>uuidable?</h3><div class="usage"><code>(uuidable? x)</code></div><div class="doc"><pre class="plaintext">Return 'true' if 'x' can be coerced to UUID.
</pre></div></div></div></div></div><div class="public anchor" id="var-UUIDNameBytes"><h3>UUIDNameBytes</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A mechanism intended for user-level extension that defines the
decoding rules for the local-part representation of arbitrary
Clojure / Java Objects when used for computing namespaced
identifiers.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-as-byte-array"><h3>as-byte-array</h3><div class="usage"><code>(as-byte-array x)</code></div><div class="doc"><pre class="plaintext">Extract a byte serialization that represents the 'name' of x,
typically unique within a given namespace.</pre></div></div></div></div></div><div class="public anchor" id="var-UUIDRfc4122"><h3>UUIDRfc4122</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-UUIDRfc9562"><h3>UUIDRfc9562</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A protocol that abstracts an unique identifier as described by
IETF RFC9562 &lt;<a href="http://www.ietf.org/rfc/rfc9562.txt&gt;">http://www.ietf.org/rfc/rfc9562.txt&gt;</a>;. A UUID
represents a 128-bit value, however there are variant encoding
layouts used to assign and interpret information encoded in
those bits.  This is a protocol for  _variant 2_ (*Leach-Salz*)
UUID's.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-clk-high"><h3>get-clk-high</h3><div class="usage"><code>(get-clk-high uuid)</code></div><div class="doc"><pre class="plaintext">Return the 8 bit unsigned value that represents the most significant
byte of the `clk-seq` multiplexed with the `variant` of this UUID.</pre></div></div><div class="public anchor" id="var-get-clk-low"><h3>get-clk-low</h3><div class="usage"><code>(get-clk-low uuid)</code></div><div class="doc"><pre class="plaintext">Return the 8 bit unsigned value that represents the least significant
byte of the `clk-seq` associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-clk-seq"><h3>get-clk-seq</h3><div class="usage"><code>(get-clk-seq uuid)</code></div><div class="doc"><pre class="plaintext">Return the clock-sequence number associated with this UUID. For time-based
(v1, v6) UUID's the 'clock-sequence' value is a somewhat counter-intuitively
named seed-value that is used to reduce the potential that duplicate UUID's
might be generated under unusual situations, such as if the system hardware
clock is set backward in time or if, despite all efforts otherwise, a
duplicate node-id happens to be generated. This value is initialized to
a random 16-bit number once per lifetime of the system.  For
non-gregorian-time-based (v3, v4, v5, v7, v8, squuid) UUID's, always
returns `nil`.</pre></div></div><div class="public anchor" id="var-get-instant"><h3>get-instant</h3><div class="usage"><code>(get-instant uuid)</code></div><div class="doc"><pre class="plaintext">For time-based (v1, v6, v7) UUID's, return a java.util.Date
object that represents the system time at which this UUID was
generated. NOTE: the returned value may not necessarily be
temporally unique. For non-time-based
(v3, v4, v5, v8, squuid) UUID's, always returns `nil`.</pre></div></div><div class="public anchor" id="var-get-node-id"><h3>get-node-id</h3><div class="usage"><code>(get-node-id uuid)</code></div><div class="doc"><pre class="plaintext">Return the 48 bit unsigned value that represents the spatially unique
node identifier associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-time-high"><h3>get-time-high</h3><div class="usage"><code>(get-time-high uuid)</code></div><div class="doc"><pre class="plaintext">Return the 16 bit unsigned value that represents the `time-high` field
of the `timestamp` multiplexed with the `version` of this UUID.</pre></div></div><div class="public anchor" id="var-get-time-low"><h3>get-time-low</h3><div class="usage"><code>(get-time-low uuid)</code></div><div class="doc"><pre class="plaintext">Return the 32 bit unsigned value that represents the `time-low` field
of the `timestamp` associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-time-mid"><h3>get-time-mid</h3><div class="usage"><code>(get-time-mid uuid)</code></div><div class="doc"><pre class="plaintext">Return the 16 bit unsigned value that represents the `time-mid` field
of the `timestamp` associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-timestamp"><h3>get-timestamp</h3><div class="usage"><code>(get-timestamp uuid)</code></div><div class="doc"><pre class="plaintext">Return the time of UUID creation.  For Gregorian time-based (v1,
v6) UUID's, this is 60 bit unsigned value that represents a
temporally unique timestamp associated with this UUID.  The result
encodes the number of 100 nanosecond intervals since the adoption of
the Gregorian calendar.  For v7 UUID's this encodes the more common
unix time in milliseconds since midnight, January 1, 1970 UTC.  For
non-time-based (v3, v4, v5, v8, squuid) UUID's, always returns
`nil`.</pre></div></div><div class="public anchor" id="var-get-unix-time"><h3>get-unix-time</h3><div class="usage"><code>(get-unix-time uuid)</code></div><div class="doc"><pre class="plaintext">For time-based (v1, v6, v7) UUIDs return the timestamp portion in
approximately milliseconds since the Unix epoch 1970-01-01T00:00:00.000Z.
For non-time-based (v3, v4, v5, v8, squuid) UUID's, always returns `nil`.</pre></div></div><div class="public anchor" id="var-get-variant"><h3>get-variant</h3><div class="usage"><code>(get-variant uuid)</code></div><div class="doc"><pre class="plaintext">Return the variant number associated with this UUID.  The variant field
contains a value which identifies the layout of the UUID.  The bit-layout
implemented by this protocol supports UUID's with a variant value of 0x2,
which indicates Leach-Salz layout.  Defined UUID variant values are:

0x0   Null
0x2   Leach-Salz
0x6   Microsoft
0x7   Max

In the canonical representation, xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx,
the most significant bits of N indicate the variant (depending on the
variant one, two, or three bits are used). The variant covered by RFC9562
is indicated by the two most significant bits of N being 1 0 (i.e., the
hexadecimal N will always be 8, 9, A, or B).</pre></div></div><div class="public anchor" id="var-get-version"><h3>get-version</h3><div class="usage"><code>(get-version uuid)</code></div><div class="doc"><pre class="plaintext">Return the version number associated with this UUID.  The version
field contains a value which describes the nature of the UUID.  There
are five versions of Leach-Salz UUID, plus the null and max UUIDs:

0x0   Null
0x1   Time based
0x2   DCE security with POSIX UID
0x3   Namespaced, deterministic (MD5 Digest)
0x4   Cryptographic random
0x5   Namespaced, deterministic (SHA1 Digest)
0x6   Time based, lexically ordered
0x7   POSIX Time based, lexically ordered, cryptographically secure
0x8   User Customizable
0xF   Max

In the canonical representation, xxxxxxxx-xxxx-Mxxx-xxxx-xxxxxxxxxxxx,
the four bits of M indicate the UUID version (i.e., the hexadecimal M
will be either 1, 2, 3, 4, 5, 6, 7, or 8).</pre></div></div><div class="public anchor" id="var-get-word-high"><h3>get-word-high</h3><div class="usage"><code>(get-word-high uuid)</code></div><div class="doc"><pre class="plaintext">Return the most significant 64 bits of UUID's 128 bit value.
</pre></div></div><div class="public anchor" id="var-get-word-low"><h3>get-word-low</h3><div class="usage"><code>(get-word-low uuid)</code></div><div class="doc"><pre class="plaintext">Return the least significant 64 bits of UUID's 128 bit value.
</pre></div></div><div class="public anchor" id="var-hash-code"><h3>hash-code</h3><div class="usage"><code>(hash-code uuid)</code></div><div class="doc"><pre class="plaintext">Return a suitable 64-bit hash value for `uuid`.  Extend with
specialized hash computation.</pre></div></div><div class="public anchor" id="var-max.3F"><h3>max?</h3><div class="usage"><code>(max? uuid)</code></div><div class="doc"><pre class="plaintext">Return `true` only if `uuid` has all 128 bits set and is
therefore equal to the maximum UUID, ffffffff-ffff-ffff-ffff-ffffffffffff.</pre></div></div><div class="public anchor" id="var-null.3F"><h3>null?</h3><div class="usage"><code>(null? uuid)</code></div><div class="doc"><pre class="plaintext">Return `true` only if `uuid` has all 128 bits set to zero and is
therefore equal to the null UUID, 00000000-0000-0000-0000-000000000000.</pre></div></div><div class="public anchor" id="var-to-byte-array"><h3>to-byte-array</h3><div class="usage"><code>(to-byte-array uuid)</code></div><div class="doc"><pre class="plaintext">Return an array of 16 bytes that represents `uuid` as a decomposed
octet serialization encoded in most-significant-byte first order.</pre></div></div><div class="public anchor" id="var-to-hex-string"><h3>to-hex-string</h3><div class="usage"><code>(to-hex-string uuid)</code></div><div class="doc"><pre class="plaintext">Return a String object that represents `uuid` as the 32 hexadecimal
characters directly encodong the UUID's 128 bit value:

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</pre></div></div><div class="public anchor" id="var-to-string"><h3>to-string</h3><div class="usage"><code>(to-string uuid)</code></div><div class="doc"><pre class="plaintext">Return a String object that represents `uuid` in the canonical
36 character hex-string format:

    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</pre></div></div><div class="public anchor" id="var-to-uri"><h3>to-uri</h3><div class="usage"><code>(to-uri uuid)</code></div><div class="doc"><pre class="plaintext">Return the unique URN URI associated with this UUID.
</pre></div></div><div class="public anchor" id="var-to-urn-string"><h3>to-urn-string</h3><div class="usage"><code>(to-urn-string uuid)</code></div><div class="doc"><pre class="plaintext">Return a String object that represents `uuid` as a the string
serialization of the URN URI based on the canonical 36 character
hex-string representation:

    urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</pre></div></div><div class="public anchor" id="var-uuid.3C"><h3>uuid&lt;</h3><div class="usage"><code>(uuid&lt; x y)</code></div><div class="doc"><pre class="plaintext">Directly compare two UUID's for &lt; relation based on the ordinality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].
See: `clj-uuid/&lt;`</pre></div></div><div class="public anchor" id="var-uuid.3D"><h3>uuid=</h3><div class="usage"><code>(uuid= x y)</code></div><div class="doc"><pre class="plaintext">Directly compare two UUID's for = relation based on the equality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].
See: `clj-uuid/=`</pre></div></div><div class="public anchor" id="var-uuid.3E"><h3>uuid&gt;</h3><div class="usage"><code>(uuid&gt; x y)</code></div><div class="doc"><pre class="plaintext">Directly compare two UUID's for &gt; relation based on the ordinality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].
See: `clj-uuid/&gt;`</pre></div></div><div class="public anchor" id="var-uuid.3F"><h3>uuid?</h3><div class="usage"><code>(uuid? x)</code></div><div class="doc"><pre class="plaintext">Return `true` if `x` implements an RFC9562 unique identifier.
</pre></div></div></div></div></div><div class="public anchor" id="var-v0"><h3>v0</h3><div class="usage"><code>(v0)</code></div><div class="doc"><pre class="plaintext">Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.
</pre></div></div><div class="public anchor" id="var-v1"><h3>v1</h3><div class="usage"><code>(v1)</code></div><div class="doc"><pre class="plaintext">Generate a v1 (time-based) unique identifier, guaranteed to be unique
and thread-safe regardless of clock precision or degree of concurrency.
Creation of v1 UUID's does not require any call to a cryptographic
generator and can be accomplished much more efficiently than v3, v4, v5, v7,
or squuid's.  A v1 UUID reveals both the identity of the computer that
generated the UUID and the time at which it did so.  Its uniqueness across
computers is guaranteed as long as MAC addresses are not duplicated.</pre></div></div><div class="public anchor" id="var-v3"><h3>v3</h3><div class="usage"><code>(v3 context local-part)</code></div><div class="doc"><pre class="plaintext">Generate a v3 (name based, MD5 hash) UUID. 'context' must be UUIDable.
v3 identifiers are intended for generating UUID's from names that are
drawn from, and unique within, some namespace.  The concept of name and
namespace should be broadly construed, and not limited to textual names.
The requirements for a v3 UUID are as follows:

* v3 UUID's generated at different times from the same name in the same
  namespace MUST be equal.

* v3 UUID's generated from two different names in the same namespace
  SHOULD be distinct with a high degree of certainty.

* v3 UUID's generated from the same name in two different namespaces
  SHOULD be distinct with a high degree of certainty.

* If two v3 UUID's are equal, then there is a high degree of certainty
  that they were generated from the same name in the same namespace.</pre></div></div><div class="public anchor" id="var-v4"><h3>v4</h3><div class="usage"><code>(v4)</code><code>(v4 msb lsb)</code></div><div class="doc"><pre class="plaintext">Generate a v4 (random) UUID.  Uses default JVM implementation.  If two
arguments, lsb and msb (both long) are provided, then construct a valid,
properly formatted v4 UUID based on those values.  So, for example the
following UUID, created from all zero bits, is indeed distinct from the
null UUID:

    (v4)
     =&gt; #uuid "dcf0035f-ea29-4d1c-b52e-4ea499c6323e"

    (v4 0 0)
     =&gt; #uuid "00000000-0000-4000-8000-000000000000"

    (null)
     =&gt; #uuid "00000000-0000-0000-0000-000000000000"</pre></div></div><div class="public anchor" id="var-v5"><h3>v5</h3><div class="usage"><code>(v5 context local-part)</code></div><div class="doc"><pre class="plaintext">Generate a v5 (name based, SHA1 hash) UUID. 'context' must be UUIDable.
v5 identifiers are intended for generating UUID's from names that are
drawn from, and unique within, some namespace.  The concept of name and
namespace should be broadly construed, and not limited to textual names.
The requirements for a v5 UUID are as follows:

* v5 UUID's generated at different times from the same name in the same
  namespace MUST be equal.

* v5 UUID's generated from two different names in the same namespace
  SHOULD be distinct with a high degree of certainty.

* v5 UUID's generated from the same name in two different namespaces
  SHOULD be distinct with a high degree of certainty.

* If two v5 UUID's are equal, then there is a high degree of certainty
  that they were generated from the same name in the same namespace.</pre></div></div><div class="public anchor" id="var-v6"><h3>v6</h3><div class="usage"><code>(v6)</code></div><div class="doc"><pre class="plaintext">Generate a v6 (time-based), LEXICALLY SORTABLE, unique identifier,
v6 is a field-compatible version of v1, reordered for improved DB
locality.  Creation of v6 UUID's does not require any call to a
cryptographic generator and can be accomplished much more efficiently
than v3, v4, v5, v7, or squuid's.  A v6 UUID uses a cryptographically
secure, hard to guess random node id. It DOES NOT reveal the identity
of the computer on which it was created.</pre></div></div><div class="public anchor" id="var-v7"><h3>v7</h3><div class="usage"><code>(v7)</code></div><div class="doc"><pre class="plaintext">Generate a v7 unix time-based, LEXICALLY SORTABLE UUID with monotonic
counter and cryptographically secure random portion and POSIX time encoding.
As such, creation of v7 UUIDs may be significantly slower, but have improved
entropy chararacteristics compared to v1 or v6 UUIDs.</pre></div></div><div class="public anchor" id="var-v7nc"><h3>v7nc</h3><div class="usage"><code>(v7nc)</code></div><div class="doc"><pre class="plaintext">Generate a v7 UUID using non-cryptographic randomness (ThreadLocalRandom).
Produces valid RFC 9562 v7 UUIDs with the same timestamp/version/variant
structure as v7, but uses java.util.concurrent.ThreadLocalRandom instead
of SecureRandom and a per-thread monotonic counter instead of a global
AtomicLong.  This trades cryptographic unguessability for significantly
higher throughput -- comparable to JUG's TimeBasedEpochGenerator.

The per-thread counter uses rand_a (12 bits) as a fixed seed per
millisecond and rand_b (62 bits) as a strictly increasing counter,
giving 2^62 UUIDs per millisecond per thread before overflow.</pre></div></div><div class="public anchor" id="var-v8"><h3>v8</h3><div class="usage"><code>(v8 msb lsb)</code></div><div class="doc"><pre class="plaintext">Generate a v8 custom UUID with up to 122 bits of user data.
</pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1 current"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.html#var-.2Bmax.2B"><div class="inner"><span>+max+</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.2Bnamespace-dns.2B"><div class="inner"><span>+namespace-dns+</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.2Bnamespace-oid.2B"><div class="inner"><span>+namespace-oid+</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.2Bnamespace-url.2B"><div class="inner"><span>+namespace-url+</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.2Bnamespace-x500.2B"><div class="inner"><span>+namespace-x500+</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.2Bnull.2B"><div class="inner"><span>+null+</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.3C"><div class="inner"><span>&lt;</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.3D"><div class="inner"><span>=</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-.3E"><div class="inner"><span>&gt;</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-as-byte-array"><div class="inner"><span>as-byte-array</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-as-uuid"><div class="inner"><span>as-uuid</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-clk-high"><div class="inner"><span>get-clk-high</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-clk-low"><div class="inner"><span>get-clk-low</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-clk-seq"><div class="inner"><span>get-clk-seq</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-instant"><div class="inner"><span>get-instant</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-node-id"><div class="inner"><span>get-node-id</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-time-high"><div class="inner"><span>get-time-high</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-time-low"><div class="inner"><span>get-time-low</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-time-mid"><div class="inner"><span>get-time-mid</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-timestamp"><div class="inner"><span>get-timestamp</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-unix-time"><div class="inner"><span>get-unix-time</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-variant"><div class="inner"><span>get-variant</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-version"><div class="inner"><span>get-version</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-word-high"><div class="inner"><span>get-word-high</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-get-word-low"><div class="inner"><span>get-word-low</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-hash-code"><div class="inner"><span>hash-code</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-max"><div class="inner"><span>max</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-max.3F"><div class="inner"><span>max?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-monotonic-time"><div class="inner"><span>monotonic-time</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-null"><div class="inner"><span>null</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-null.3F"><div class="inner"><span>null?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-squuid"><div class="inner"><span>squuid</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-to-byte-array"><div class="inner"><span>to-byte-array</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-to-hex-string"><div class="inner"><span>to-hex-string</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-to-string"><div class="inner"><span>to-string</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-to-uri"><div class="inner"><span>to-uri</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-to-urn-string"><div class="inner"><span>to-urn-string</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid-string.3F"><div class="inner"><span>uuid-string?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid-urn-string.3F"><div class="inner"><span>uuid-urn-string?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid-vec.3F"><div class="inner"><span>uuid-vec?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid.3C"><div class="inner"><span>uuid&lt;</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid.3D"><div class="inner"><span>uuid=</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid.3E"><div class="inner"><span>uuid&gt;</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuid.3F"><div class="inner"><span>uuid?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-UUIDable"><div class="inner"><span>UUIDable</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-uuidable.3F"><div class="inner"><span>uuidable?</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-UUIDNameBytes"><div class="inner"><span>UUIDNameBytes</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-UUIDRfc4122"><div class="inner"><span>UUIDRfc4122</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-UUIDRfc9562"><div class="inner"><span>UUIDRfc9562</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v0"><div class="inner"><span>v0</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v1"><div class="inner"><span>v1</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v3"><div class="inner"><span>v3</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v4"><div class="inner"><span>v4</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v5"><div class="inner"><span>v5</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v6"><div class="inner"><span>v6</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v7"><div class="inner"><span>v7</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v7nc"><div class="inner"><span>v7nc</span></div></a></li><li class="depth-1"><a href="clj-uuid.html#var-v8"><div class="inner"><span>v8</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid</h1><div class="doc"><pre class="plaintext">RFC 9562 UUID implementation for Clojure.

This namespace re-exports all public vars from clj-uuid.core. For backward
compatibility, both `(require '[clj-uuid :as uuid])` and
`(require '[clj-uuid.core :as uuid])` provide identical functionality.

Quick start:
  (require '[clj-uuid :as uuid])
  (uuid/v4)       ; random UUID
  (uuid/v7)       ; time-based, sortable, cryptographically secure
  (uuid/v7nc)     ; time-based, sortable, fast (non-cryptographic)

See clj-uuid.core for complete documentation.</pre></div><div class="public anchor" id="var-.2Bmax.2B"><h3>+max+</h3><div class="usage"></div><div class="doc"><pre class="plaintext">The MAX UUID is a special form of sentinel UUID that is specified to have
all 128 bits set to one.</pre></div></div><div class="public anchor" id="var-.2Bnamespace-dns.2B"><h3>+namespace-dns+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnamespace-oid.2B"><h3>+namespace-oid+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnamespace-url.2B"><h3>+namespace-url+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnamespace-x500.2B"><h3>+namespace-x500+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnull.2B"><h3>+null+</h3><div class="usage"></div><div class="doc"><pre class="plaintext">The NULL UUID is a special form of sentinel UUID that is specified to have
all 128 bits set to zero.</pre></div></div><div class="public anchor" id="var-.3C"><h3>&lt;</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Directly compare two or more UUIDs for &lt; relation based on the
ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
EQUIVALENCE].</pre></div></div><div class="public anchor" id="var-.3D"><h3>=</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Directly compare two or more UUIDs for = relation based on the
equality semantics defined by [RFC4122:3 RULES FOR LEXICAL
EQUIVALENCE].</pre></div></div><div class="public anchor" id="var-.3E"><h3>&gt;</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Directly compare two or more UUIDs for &gt; relation based on the
ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL
EQUIVALENCE].</pre></div></div><div class="public anchor" id="var-as-byte-array"><h3>as-byte-array</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Extract a byte serialization that represents the 'name' of x,
typically unique within a given namespace.</pre></div></div><div class="public anchor" id="var-as-uuid"><h3>as-uuid</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Coerce the value 'x' to a UUID.
</pre></div></div><div class="public anchor" id="var-get-clk-high"><h3>get-clk-high</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the 8 bit unsigned value that represents the most significant
byte of the `clk-seq` multiplexed with the `variant` of this UUID.</pre></div></div><div class="public anchor" id="var-get-clk-low"><h3>get-clk-low</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the 8 bit unsigned value that represents the least significant
byte of the `clk-seq` associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-clk-seq"><h3>get-clk-seq</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the clock-sequence number associated with this UUID. For time-based
(v1, v6) UUID's the 'clock-sequence' value is a somewhat counter-intuitively
named seed-value that is used to reduce the potential that duplicate UUID's
might be generated under unusual situations, such as if the system hardware
clock is set backward in time or if, despite all efforts otherwise, a
duplicate node-id happens to be generated. This value is initialized to
a random 16-bit number once per lifetime of the system.  For
non-gregorian-time-based (v3, v4, v5, v7, v8, squuid) UUID's, always
returns `nil`.</pre></div></div><div class="public anchor" id="var-get-instant"><h3>get-instant</h3><div class="usage"></div><div class="doc"><pre class="plaintext">For time-based (v1, v6, v7) UUID's, return a java.util.Date
object that represents the system time at which this UUID was
generated. NOTE: the returned value may not necessarily be
temporally unique. For non-time-based
(v3, v4, v5, v8, squuid) UUID's, always returns `nil`.</pre></div></div><div class="public anchor" id="var-get-node-id"><h3>get-node-id</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the 48 bit unsigned value that represents the spatially unique
node identifier associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-time-high"><h3>get-time-high</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the 16 bit unsigned value that represents the `time-high` field
of the `timestamp` multiplexed with the `version` of this UUID.</pre></div></div><div class="public anchor" id="var-get-time-low"><h3>get-time-low</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the 32 bit unsigned value that represents the `time-low` field
of the `timestamp` associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-time-mid"><h3>get-time-mid</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the 16 bit unsigned value that represents the `time-mid` field
of the `timestamp` associated with this UUID.</pre></div></div><div class="public anchor" id="var-get-timestamp"><h3>get-timestamp</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the time of UUID creation.  For Gregorian time-based (v1,
v6) UUID's, this is 60 bit unsigned value that represents a
temporally unique timestamp associated with this UUID.  The result
encodes the number of 100 nanosecond intervals since the adoption of
the Gregorian calendar.  For v7 UUID's this encodes the more common
unix time in milliseconds since midnight, January 1, 1970 UTC.  For
non-time-based (v3, v4, v5, v8, squuid) UUID's, always returns
`nil`.</pre></div></div><div class="public anchor" id="var-get-unix-time"><h3>get-unix-time</h3><div class="usage"></div><div class="doc"><pre class="plaintext">For time-based (v1, v6, v7) UUIDs return the timestamp portion in
approximately milliseconds since the Unix epoch 1970-01-01T00:00:00.000Z.
For non-time-based (v3, v4, v5, v8, squuid) UUID's, always returns `nil`.</pre></div></div><div class="public anchor" id="var-get-variant"><h3>get-variant</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the variant number associated with this UUID.  The variant field
contains a value which identifies the layout of the UUID.  The bit-layout
implemented by this protocol supports UUID's with a variant value of 0x2,
which indicates Leach-Salz layout.  Defined UUID variant values are:

0x0   Null
0x2   Leach-Salz
0x6   Microsoft
0x7   Max

In the canonical representation, xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx,
the most significant bits of N indicate the variant (depending on the
variant one, two, or three bits are used). The variant covered by RFC9562
is indicated by the two most significant bits of N being 1 0 (i.e., the
hexadecimal N will always be 8, 9, A, or B).</pre></div></div><div class="public anchor" id="var-get-version"><h3>get-version</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the version number associated with this UUID.  The version
field contains a value which describes the nature of the UUID.  There
are five versions of Leach-Salz UUID, plus the null and max UUIDs:

0x0   Null
0x1   Time based
0x2   DCE security with POSIX UID
0x3   Namespaced, deterministic (MD5 Digest)
0x4   Cryptographic random
0x5   Namespaced, deterministic (SHA1 Digest)
0x6   Time based, lexically ordered
0x7   POSIX Time based, lexically ordered, cryptographically secure
0x8   User Customizable
0xF   Max

In the canonical representation, xxxxxxxx-xxxx-Mxxx-xxxx-xxxxxxxxxxxx,
the four bits of M indicate the UUID version (i.e., the hexadecimal M
will be either 1, 2, 3, 4, 5, 6, 7, or 8).</pre></div></div><div class="public anchor" id="var-get-word-high"><h3>get-word-high</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the most significant 64 bits of UUID's 128 bit value.
</pre></div></div><div class="public anchor" id="var-get-word-low"><h3>get-word-low</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the least significant 64 bits of UUID's 128 bit value.
</pre></div></div><div class="public anchor" id="var-hash-code"><h3>hash-code</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return a suitable 64-bit hash value for `uuid`.  Extend with
specialized hash computation.</pre></div></div><div class="public anchor" id="var-max"><h3>max</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generates the v15 (maximum) UUID, ffffffff-ffff-ffff-ffff-ffffffffffff.
</pre></div></div><div class="public anchor" id="var-max.3F"><h3>max?</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return `true` only if `uuid` has all 128 bits set and is
therefore equal to the maximum UUID, ffffffff-ffff-ffff-ffff-ffffffffffff.</pre></div></div><div class="public anchor" id="var-monotonic-time"><h3>monotonic-time</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return a monotonic timestamp (guaranteed always increasing) based on
the number of 100-nanosecond intervals elapsed since the adoption of
the Gregorian calendar in the West, 12:00am Friday October 15, 1582 UTC.</pre></div></div><div class="public anchor" id="var-null"><h3>null</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.
</pre></div></div><div class="public anchor" id="var-null.3F"><h3>null?</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return `true` only if `uuid` has all 128 bits set to zero and is
therefore equal to the null UUID, 00000000-0000-0000-0000-000000000000.</pre></div></div><div class="public anchor" id="var-squuid"><h3>squuid</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a SQUUID (sequential, random) unique identifier.  SQUUID's
are a nonstandard variation on v4 (random) UUIDs that have the
desirable property that they increase sequentially over time as well
as encode retrievably the posix time at which they were generated.
Splits and reassembles a v4 UUID to merge current POSIX
time (seconds since 12:00am January 1, 1970 UTC) with the most
significant 32 bits of the UUID.</pre></div></div><div class="public anchor" id="var-to-byte-array"><h3>to-byte-array</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return an array of 16 bytes that represents `uuid` as a decomposed
octet serialization encoded in most-significant-byte first order.</pre></div></div><div class="public anchor" id="var-to-hex-string"><h3>to-hex-string</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return a String object that represents `uuid` as the 32 hexadecimal
characters directly encodong the UUID's 128 bit value:

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</pre></div></div><div class="public anchor" id="var-to-string"><h3>to-string</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return a String object that represents `uuid` in the canonical
36 character hex-string format:

    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</pre></div></div><div class="public anchor" id="var-to-uri"><h3>to-uri</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return the unique URN URI associated with this UUID.
</pre></div></div><div class="public anchor" id="var-to-urn-string"><h3>to-urn-string</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return a String object that represents `uuid` as a the string
serialization of the URN URI based on the canonical 36 character
hex-string representation:

    urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</pre></div></div><div class="public anchor" id="var-uuid-string.3F"><h3>uuid-string?</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid-urn-string.3F"><h3>uuid-urn-string?</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid-vec.3F"><h3>uuid-vec?</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuid.3C"><h3>uuid&lt;</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Directly compare two UUID's for &lt; relation based on the ordinality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].
See: `clj-uuid/&lt;`</pre></div></div><div class="public anchor" id="var-uuid.3D"><h3>uuid=</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Directly compare two UUID's for = relation based on the equality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].
See: `clj-uuid/=`</pre></div></div><div class="public anchor" id="var-uuid.3E"><h3>uuid&gt;</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Directly compare two UUID's for &gt; relation based on the ordinality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].
See: `clj-uuid/&gt;`</pre></div></div><div class="public anchor" id="var-uuid.3F"><h3>uuid?</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return `true` if `x` implements an RFC9562 unique identifier.
</pre></div></div><div class="public anchor" id="var-UUIDable"><h3>UUIDable</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-uuidable.3F"><h3>uuidable?</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Return 'true' if 'x' can be coerced to UUID.
</pre></div></div><div class="public anchor" id="var-UUIDNameBytes"><h3>UUIDNameBytes</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-UUIDRfc4122"><h3>UUIDRfc4122</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-UUIDRfc9562"><h3>UUIDRfc9562</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-v0"><h3>v0</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.
</pre></div></div><div class="public anchor" id="var-v1"><h3>v1</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v1 (time-based) unique identifier, guaranteed to be unique
and thread-safe regardless of clock precision or degree of concurrency.
Creation of v1 UUID's does not require any call to a cryptographic
generator and can be accomplished much more efficiently than v3, v4, v5, v7,
or squuid's.  A v1 UUID reveals both the identity of the computer that
generated the UUID and the time at which it did so.  Its uniqueness across
computers is guaranteed as long as MAC addresses are not duplicated.</pre></div></div><div class="public anchor" id="var-v3"><h3>v3</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v3 (name based, MD5 hash) UUID. 'context' must be UUIDable.
v3 identifiers are intended for generating UUID's from names that are
drawn from, and unique within, some namespace.  The concept of name and
namespace should be broadly construed, and not limited to textual names.
The requirements for a v3 UUID are as follows:

* v3 UUID's generated at different times from the same name in the same
  namespace MUST be equal.

* v3 UUID's generated from two different names in the same namespace
  SHOULD be distinct with a high degree of certainty.

* v3 UUID's generated from the same name in two different namespaces
  SHOULD be distinct with a high degree of certainty.

* If two v3 UUID's are equal, then there is a high degree of certainty
  that they were generated from the same name in the same namespace.</pre></div></div><div class="public anchor" id="var-v4"><h3>v4</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v4 (random) UUID.  Uses default JVM implementation.  If two
arguments, lsb and msb (both long) are provided, then construct a valid,
properly formatted v4 UUID based on those values.  So, for example the
following UUID, created from all zero bits, is indeed distinct from the
null UUID:

    (v4)
     =&gt; #uuid "dcf0035f-ea29-4d1c-b52e-4ea499c6323e"

    (v4 0 0)
     =&gt; #uuid "00000000-0000-4000-8000-000000000000"

    (null)
     =&gt; #uuid "00000000-0000-0000-0000-000000000000"</pre></div></div><div class="public anchor" id="var-v5"><h3>v5</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v5 (name based, SHA1 hash) UUID. 'context' must be UUIDable.
v5 identifiers are intended for generating UUID's from names that are
drawn from, and unique within, some namespace.  The concept of name and
namespace should be broadly construed, and not limited to textual names.
The requirements for a v5 UUID are as follows:

* v5 UUID's generated at different times from the same name in the same
  namespace MUST be equal.

* v5 UUID's generated from two different names in the same namespace
  SHOULD be distinct with a high degree of certainty.

* v5 UUID's generated from the same name in two different namespaces
  SHOULD be distinct with a high degree of certainty.

* If two v5 UUID's are equal, then there is a high degree of certainty
  that they were generated from the same name in the same namespace.</pre></div></div><div class="public anchor" id="var-v6"><h3>v6</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v6 (time-based), LEXICALLY SORTABLE, unique identifier,
v6 is a field-compatible version of v1, reordered for improved DB
locality.  Creation of v6 UUID's does not require any call to a
cryptographic generator and can be accomplished much more efficiently
than v3, v4, v5, v7, or squuid's.  A v6 UUID uses a cryptographically
secure, hard to guess random node id. It DOES NOT reveal the identity
of the computer on which it was created.</pre></div></div><div class="public anchor" id="var-v7"><h3>v7</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v7 unix time-based, LEXICALLY SORTABLE UUID with monotonic
counter and cryptographically secure random portion and POSIX time encoding.
As such, creation of v7 UUIDs may be significantly slower, but have improved
entropy chararacteristics compared to v1 or v6 UUIDs.</pre></div></div><div class="public anchor" id="var-v7nc"><h3>v7nc</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v7 UUID using non-cryptographic randomness (ThreadLocalRandom).
Produces valid RFC 9562 v7 UUIDs with the same timestamp/version/variant
structure as v7, but uses java.util.concurrent.ThreadLocalRandom instead
of SecureRandom and a per-thread monotonic counter instead of a global
AtomicLong.  This trades cryptographic unguessability for significantly
higher throughput -- comparable to JUG's TimeBasedEpochGenerator.

The per-thread counter uses rand_a (12 bits) as a fixed seed per
millisecond and rand_b (62 bits) as a strictly increasing counter,
giving 2^62 UUIDs per millisecond per thread before overflow.</pre></div></div><div class="public anchor" id="var-v8"><h3>v8</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Generate a v8 custom UUID with up to 122 bits of user data.
</pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.node.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.node documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.node.html#var-.2Bclock-sequence.2B"><div class="inner"><span>+clock-sequence+</span></div></a></li><li class="depth-1"><a href="clj-uuid.node.html#var-.2Bnode-id.2B"><div class="inner"><span>+node-id+</span></div></a></li><li class="depth-1"><a href="clj-uuid.node.html#var-.2Bv1-lsb.2B"><div class="inner"><span>+v1-lsb+</span></div></a></li><li class="depth-1"><a href="clj-uuid.node.html#var-.2Bv6-lsb.2B"><div class="inner"><span>+v6-lsb+</span></div></a></li><li class="depth-1"><a href="clj-uuid.node.html#var-node-id"><div class="inner"><span>node-id</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.node</h1><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-.2Bclock-sequence.2B"><h3>+clock-sequence+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bnode-id.2B"><h3>+node-id+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bv1-lsb.2B"><h3>+v1-lsb+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.2Bv6-lsb.2B"><h3>+v6-lsb+</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-node-id"><h3>node-id</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.random.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.random documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch current"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.random.html#var-bytes"><div class="inner"><span>bytes</span></div></a></li><li class="depth-1"><a href="clj-uuid.random.html#var-eight-bits"><div class="inner"><span>eight-bits</span></div></a></li><li class="depth-1"><a href="clj-uuid.random.html#var-eleven-bits"><div class="inner"><span>eleven-bits</span></div></a></li><li class="depth-1"><a href="clj-uuid.random.html#var-long"><div class="inner"><span>long</span></div></a></li><li class="depth-1"><a href="clj-uuid.random.html#var-ten-bits"><div class="inner"><span>ten-bits</span></div></a></li><li class="depth-1"><a href="clj-uuid.random.html#var-twelve-bits"><div class="inner"><span>twelve-bits</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.random</h1><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-bytes"><h3>bytes</h3><div class="usage"><code>(bytes n)</code></div><div class="doc"><pre class="plaintext">Generate `n` random bytes.
</pre></div></div><div class="public anchor" id="var-eight-bits"><h3>eight-bits</h3><div class="usage"><code>(eight-bits)</code></div><div class="doc"><pre class="plaintext">Generate a hard-to-guess long value between 0 and 255
</pre></div></div><div class="public anchor" id="var-eleven-bits"><h3>eleven-bits</h3><div class="usage"><code>(eleven-bits)</code></div><div class="doc"><pre class="plaintext">Generate a hard-to-guess long value between 0 and 2047
</pre></div></div><div class="public anchor" id="var-long"><h3>long</h3><div class="usage"><code>(long)</code><code>(long n-bytes)</code></div><div class="doc"><pre class="plaintext">Generate a long value that is hard to guess. Randomness limited to the
number of bytes.</pre></div></div><div class="public anchor" id="var-ten-bits"><h3>ten-bits</h3><div class="usage"><code>(ten-bits)</code></div><div class="doc"><pre class="plaintext">Generate a hard-to-guess long value between 0 and 1023
</pre></div></div><div class="public anchor" id="var-twelve-bits"><h3>twelve-bits</h3><div class="usage"><code>(twelve-bits)</code></div><div class="doc"><pre class="plaintext">Generate a hard-to-guess long value between 0 and 4095
</pre></div></div></div></body></html>

================================================
FILE: doc/api/clj-uuid.util.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid.util documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2 current"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-uuid.util.html#var-compile-if"><div class="inner"><span>compile-if</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-import-vars"><div class="inner"><span>import-vars</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-java6.3F"><div class="inner"><span>java6?</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-lines-of-file"><div class="inner"><span>lines-of-file</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-returning"><div class="inner"><span>returning</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-with-temp-file"><div class="inner"><span>with-temp-file</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-with-timing"><div class="inner"><span>with-timing</span></div></a></li><li class="depth-1"><a href="clj-uuid.util.html#var-wrap-fn"><div class="inner"><span>wrap-fn</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-uuid.util</h1><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-compile-if"><h3>compile-if</h3><h4 class="type">macro</h4><div class="usage"><code>(compile-if exp then else)</code></div><div class="doc"><pre class="plaintext">Evaluate `exp` and if it returns logical true and doesn't error, expand to
`then` otherwise expand to `else`.
credit: &lt;clojure/src/clj/clojure/core/reducers.clj#L24&gt;

(compile-if (Class/forName "java.util.concurrent.ForkJoinTask")
  (do-cool-stuff-with-fork-join)
  (fall-back-to-executor-services))</pre></div></div><div class="public anchor" id="var-import-vars"><h3>import-vars</h3><h4 class="type">macro</h4><div class="usage"><code>(import-vars src-ns &amp; var-syms)</code></div><div class="doc"><pre class="plaintext">Import public vars from src-ns into the current namespace.
</pre></div></div><div class="public anchor" id="var-java6.3F"><h3>java6?</h3><div class="usage"><code>(java6?)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lines-of-file"><h3>lines-of-file</h3><div class="usage"><code>(lines-of-file file-name)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-returning"><h3>returning</h3><h4 class="type">macro</h4><div class="usage"><code>(returning value &amp; forms)</code></div><div class="doc"><pre class="plaintext">Compute a return value, then execute other forms for side effects.
Like prog1 in common lisp, or a (do) that returns the first form.</pre></div></div><div class="public anchor" id="var-with-temp-file"><h3>with-temp-file</h3><h4 class="type">macro</h4><div class="usage"><code>(with-temp-file f-sym &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-with-timing"><h3>with-timing</h3><h4 class="type">macro</h4><div class="usage"><code>(with-timing &amp; body)</code></div><div class="doc"><pre class="plaintext">Same as clojure.core/time but returns a vector of a the result of
the code and the milliseconds rather than printing a string. Runs
the code in an implicit do.</pre></div></div><div class="public anchor" id="var-wrap-fn"><h3>wrap-fn</h3><h4 class="type">macro</h4><div class="usage"><code>(wrap-fn name args &amp; body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html>

================================================
FILE: doc/api/css/default.css
================================================
body {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
}

pre, code {
    font-family: Monaco, DejaVu Sans Mono, Consolas, monospace;
    font-size: 9pt;
    margin: 15px 0;
}

h1 {
    font-weight: normal;
    font-size: 29px;
    margin: 10px 0 2px 0;
    padding: 0;
}

h2 {
    font-weight: normal;
    font-size: 25px;
}

h5.license {
    margin: 9px 0 22px 0;
    color: #555;
    font-weight: normal;
    font-size: 12px;
    font-style: italic;
}

.document h1, .namespace-index h1 {
    font-size: 32px;
    margin-top: 12px;
}

#header, #content, .sidebar {
    position: fixed;
}

#header {
    top: 0;
    left: 0;
    right: 0;
    height: 22px;
    color: #f5f5f5;
    padding: 5px 7px;
}

#content {
    top: 32px;
    right: 0;
    bottom: 0;
    overflow: auto;
    background: #fff;
    color: #333;
    padding: 0 18px;
}

.sidebar {
    position: fixed;
    top: 32px;
    bottom: 0;
    overflow: auto;
}

.sidebar.primary {
    background: #e2e2e2;
    border-right: solid 1px #cccccc;
    left: 0;
    width: 250px;
}

.sidebar.secondary {
    background: #f2f2f2;
    border-right: solid 1px #d7d7d7;
    left: 251px;
    width: 200px;
}

#content.namespace-index, #content.document {
    left: 251px;
}

#content.namespace-docs {
    left: 452px;
}

#content.document {
    padding-bottom: 10%;
}

#header {
    background: #3f3f3f;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

#header h1 {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: lighter;
    text-shadow: -1px -1px 0px #333;
}

#header h1 .project-version {
    font-weight: normal;
}

.project-version {
    padding-left: 0.15em;
}

#header a, .sidebar a {
    display: block;
    text-decoration: none;
}

#header a {
    color: #f5f5f5;
}

.sidebar a {
    color: #333;
}

#header h2 {
    float: right;
    font-size: 9pt;
    font-weight: normal;
    margin: 4px 3px;
    padding: 0;
    color: #bbb;
}

#header h2 a {
    display: inline;
}

.sidebar h3 {
    margin: 0;
    padding: 10px 13px 0 13px;
    font-size: 19px;
    font-weight: lighter;
}

.sidebar h3 a {
    color: #444;
}

.sidebar h3.no-link {
    color: #636363;
}

.sidebar ul {
    padding: 7px 0 6px 0;
    margin: 0;
}

.sidebar ul.index-link {
    padding-bottom: 4px;
}

.sidebar li {
    display: block;
    vertical-align: middle;
}

.sidebar li a, .sidebar li .no-link {
    border-left: 3px solid transparent;
    padding: 0 10px;
    white-space: nowrap;
}

.sidebar li .no-link {
    display: block;
    color: #777;
    font-style: italic;
}

.sidebar li .inner {
    display: inline-block;
    padding-top: 7px;
    height: 24px;
}

.sidebar li a, .sidebar li .tree {
    height: 31px;
}

.depth-1 .inner { padding-left: 2px; }
.depth-2 .inner { padding-left: 6px; }
.depth-3 .inner { padding-left: 20px; }
.depth-4 .inner { padding-left: 34px; }
.depth-5 .inner { padding-left: 48px; }
.depth-6 .inner { padding-left: 62px; }

.sidebar li .tree {
    display: block;
    float: left;
    position: relative;
    top: -10px;
    margin: 0 4px 0 0;
    padding: 0;
}

.sidebar li.depth-1 .tree {
    display: none;
}

.sidebar li .tree .top, .sidebar li .tree .bottom {
    display: block;
    margin: 0;
    padding: 0;
    width: 7px;
}

.sidebar li .tree .top {
    border-left: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
    height: 19px;
}

.sidebar li .tree .bottom {
    height: 22px;
}

.sidebar li.branch .tree .bottom {
    border-left: 1px solid #aaa;
}

.sidebar.primary li.current a {
    border-left: 3px solid #a33;
    color: #a33;
}

.sidebar.secondary li.current a {
    border-left: 3px solid #33a;
    color: #33a;
}

.namespace-index h2 {
    margin: 30px 0 0 0;
}

.namespace-index h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 0;
}

.namespace-index .topics {
    padding-left: 30px;
    margin: 11px 0 0 0;
}

.namespace-index .topics li {
    padding: 5px 0;
}

.namespace-docs h3 {
    font-size: 18px;
    font-weight: bold;
}

.public h3 {
    margin: 0;
    float: left;
}

.usage {
    clear: both;
}

.public {
    margin: 0;
    border-top: 1px solid #e0e0e0;
    padding-top: 14px;
    padding-bottom: 6px;
}

.public:last-child {
    margin-bottom: 20%;
}

.members .public:last-child {
    margin-bottom: 0;
}

.members {
    margin: 15px 0;
}

.members h4 {
    color: #555;
    font-weight: normal;
    font-variant: small-caps;
    margin: 0 0 5px 0;
}

.members .inner {
    padding-top: 5px;
    padding-left: 12px;
    margin-top: 2px;
    margin-left: 7px;
    border-left: 1px solid #bbb;
}

#content .members .inner h3 {
    font-size: 12pt;
}

.members .public {
    border-top: none;
    margin-top: 0;
    padding-top: 6px;
    padding-bottom: 0;
}

.members .public:first-child {
    padding-top: 0;
}

h4.type,
h4.dynamic,
h4.added,
h4.deprecated {
    float: left;
    margin: 3px 10px 15px 0;
    font-size: 15px;
    font-weight: bold;
    font-variant: small-caps;
}

.public h4.type,
.public h4.dynamic,
.public h4.added,
.public h4.deprecated {
    font-size: 13px;
    font-weight: bold;
    margin: 3px 0 0 10px;
}

.members h4.type,
.members h4.added,
.members h4.deprecated {
    margin-top: 1px;
}

h4.type {
    color: #717171;
}

h4.dynamic {
    color: #9933aa;
}

h4.added {
    color: #508820;
}

h4.deprecated {
    color: #880000;
}

.namespace {
    margin-bottom: 30px;
}

.namespace:last-child {
    margin-bottom: 10%;
}

.index {
    padding: 0;
    font-size: 80%;
    margin: 15px 0;
    line-height: 16px;
}

.index * {
    display: inline;
}

.index p {
    padding-right: 3px;
}

.index li {
    padding-right: 5px;
}

.index ul {
    padding-left: 0;
}

.type-sig {
    clear: both;
    color: #088;
}

.type-sig pre {
    padding-top: 10px;
    margin: 0;
}

.usage code {
    display: block;
    color: #008;
    margin: 2px 0;
}

.usage code:first-child {
    padding-top: 10px;
}

p {
    margin: 15px 0;
}

.public p:first-child, .public pre.plaintext {
    margin-top: 12px;
}

.doc {
    margin: 0 0 26px 0;
    clear: both;
}

.public .doc {
    margin: 0;
}

.namespace-index .doc {
    margin-bottom: 20px;
}

.namespace-index .namespace .doc {
    margin-bottom: 10px;
}

.markdown p, .markdown li, .markdown dt, .markdown dd, .markdown td {
    line-height: 22px;
}

.markdown li {
    padding: 2px 0;
}

.markdown h2 {
    font-weight: normal;
    font-size: 25px;
    margin: 30px 0 10px 0;
}

.markdown h3 {
    font-weight: normal;
    font-size: 20px;
    margin: 30px 0 0 0;
}

.markdown h4 {
    font-size: 15px;
    margin: 22px 0 -4px 0;
}

.doc, .public, .namespace .index {
    max-width: 680px;
    overflow-x: visible;
}

.markdown pre > code {
    display: block;
    padding: 10px;
}

.markdown pre > code, .src-link a {
    border: 1px solid #e4e4e4;
    border-radius: 2px;
}

.markdown code:not(.hljs), .src-link a {
    background: #f6f6f6;
}

pre.deps {
    display: inline-block;
    margin: 0 10px;
    border: 1px solid #e4e4e4;
    border-radius: 2px;
    padding: 10px;
    background-color: #f6f6f6;
}

.markdown hr {
    border-style: solid;
    border-top: none;
    color: #ccc;
}

.doc ul, .doc ol {
    padding-left: 30px;
}

.doc table {
    border-collapse: collapse;
    margin: 0 10px;
}

.doc table td, .doc table th {
    border: 1px solid #dddddd;
    padding: 4px 6px;
}

.doc table th {
    background: #f2f2f2;
}

.doc dl {
    margin: 0 10px 20px 10px;
}

.doc dl dt {
    font-weight: bold;
    margin: 0;
    padding: 3px 0;
    border-bottom: 1px solid #ddd;
}

.doc dl dd {
    padding: 5px 0;
    margin: 0 0 5px 10px;
}

.doc abbr {
    border-bottom: 1px dotted #333;
    font-variant: none;
    cursor: help;
}

.src-link {
    margin-bottom: 15px;
}

.src-link a {
    font-size: 70%;
    padding: 1px 4px;
    text-decoration: none;
    color: #5555bb;
}


================================================
FILE: doc/api/css/highlight.css
================================================
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/

.hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  color: #333;
  background: #f8f8f8;
}

.hljs-comment,
.hljs-quote {
  color: #998;
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
  color: #333;
  font-weight: bold;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
  color: #008080;
}

.hljs-string,
.hljs-doctag {
  color: #d14;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
  color: #900;
  font-weight: bold;
}

.hljs-subst {
  font-weight: normal;
}

.hljs-type,
.hljs-class .hljs-title {
  color: #458;
  font-weight: bold;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
  color: #000080;
  font-weight: normal;
}

.hljs-regexp,
.hljs-link {
  color: #009926;
}

.hljs-symbol,
.hljs-bullet {
  color: #990073;
}

.hljs-built_in,
.hljs-builtin-name {
  color: #0086b3;
}

.hljs-meta {
  color: #999;
  font-weight: bold;
}

.hljs-deletion {
  background: #fdd;
}

.hljs-addition {
  background: #dfd;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}


================================================
FILE: doc/api/index.html
================================================
<!DOCTYPE html PUBLIC ""
    "">
<html><head><meta charset="UTF-8" /><title>clj-uuid 0.2.5-SNAPSHOT</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 current"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="clj-uuid.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-uuid</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.bitmop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bitmop</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.clock.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clock</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.constants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>constants</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch"><a href="clj-uuid.random.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>random</span></div></a></li><li class="depth-2"><a href="clj-uuid.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="namespace-index" id="content"><h1><span class="project-title"><span class="project-name">clj-uuid</span> <span class="project-version">0.2.5-SNAPSHOT</span></span></h1><h5 class="license">Released under the <a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License</a></h5><div class="doc"><p>A Clojure library for generation and utilization of
                UUIDs (Universally Unique Identifiers) as described by
                RFC-9562. This library extends the standard Java
                UUID class to provide true v1, v6, v7 (time based) and
                v3/v5 (namespace based), and v8 (user customizable)
                identifier generation. Additionally, a number of useful
                utilities are provided to support serialization and
                manipulation of these UUIDs in a simple, efficient
                manner.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><pre class="deps">[danlentz/clj-uuid "0.2.5-SNAPSHOT"]</pre><h2>Namespaces</h2><div class="namespace"><h3><a href="clj-uuid.html">clj-uuid</a></h3><div class="doc"><pre class="plaintext">RFC 9562 UUID implementation for Clojure.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.html#var-.2Bmax.2B">+max+</a> </li><li> <a href="clj-uuid.html#var-.2Bnamespace-dns.2B">+namespace-dns+</a> </li><li> <a href="clj-uuid.html#var-.2Bnamespace-oid.2B">+namespace-oid+</a> </li><li> <a href="clj-uuid.html#var-.2Bnamespace-url.2B">+namespace-url+</a> </li><li> <a href="clj-uuid.html#var-.2Bnamespace-x500.2B">+namespace-x500+</a> </li><li> <a href="clj-uuid.html#var-.2Bnull.2B">+null+</a> </li><li> <a href="clj-uuid.html#var-.3C">&lt;</a> </li><li> <a href="clj-uuid.html#var-.3D">=</a> </li><li> <a href="clj-uuid.html#var-.3E">&gt;</a> </li><li> <a href="clj-uuid.html#var-as-byte-array">as-byte-array</a> </li><li> <a href="clj-uuid.html#var-as-uuid">as-uuid</a> </li><li> <a href="clj-uuid.html#var-get-clk-high">get-clk-high</a> </li><li> <a href="clj-uuid.html#var-get-clk-low">get-clk-low</a> </li><li> <a href="clj-uuid.html#var-get-clk-seq">get-clk-seq</a> </li><li> <a href="clj-uuid.html#var-get-instant">get-instant</a> </li><li> <a href="clj-uuid.html#var-get-node-id">get-node-id</a> </li><li> <a href="clj-uuid.html#var-get-time-high">get-time-high</a> </li><li> <a href="clj-uuid.html#var-get-time-low">get-time-low</a> </li><li> <a href="clj-uuid.html#var-get-time-mid">get-time-mid</a> </li><li> <a href="clj-uuid.html#var-get-timestamp">get-timestamp</a> </li><li> <a href="clj-uuid.html#var-get-unix-time">get-unix-time</a> </li><li> <a href="clj-uuid.html#var-get-variant">get-variant</a> </li><li> <a href="clj-uuid.html#var-get-version">get-version</a> </li><li> <a href="clj-uuid.html#var-get-word-high">get-word-high</a> </li><li> <a href="clj-uuid.html#var-get-word-low">get-word-low</a> </li><li> <a href="clj-uuid.html#var-hash-code">hash-code</a> </li><li> <a href="clj-uuid.html#var-max">max</a> </li><li> <a href="clj-uuid.html#var-max.3F">max?</a> </li><li> <a href="clj-uuid.html#var-monotonic-time">monotonic-time</a> </li><li> <a href="clj-uuid.html#var-null">null</a> </li><li> <a href="clj-uuid.html#var-null.3F">null?</a> </li><li> <a href="clj-uuid.html#var-squuid">squuid</a> </li><li> <a href="clj-uuid.html#var-to-byte-array">to-byte-array</a> </li><li> <a href="clj-uuid.html#var-to-hex-string">to-hex-string</a> </li><li> <a href="clj-uuid.html#var-to-string">to-string</a> </li><li> <a href="clj-uuid.html#var-to-uri">to-uri</a> </li><li> <a href="clj-uuid.html#var-to-urn-string">to-urn-string</a> </li><li> <a href="clj-uuid.html#var-uuid-string.3F">uuid-string?</a> </li><li> <a href="clj-uuid.html#var-uuid-urn-string.3F">uuid-urn-string?</a> </li><li> <a href="clj-uuid.html#var-uuid-vec.3F">uuid-vec?</a> </li><li> <a href="clj-uuid.html#var-uuid.3C">uuid&lt;</a> </li><li> <a href="clj-uuid.html#var-uuid.3D">uuid=</a> </li><li> <a href="clj-uuid.html#var-uuid.3E">uuid&gt;</a> </li><li> <a href="clj-uuid.html#var-uuid.3F">uuid?</a> </li><li> <a href="clj-uuid.html#var-UUIDable">UUIDable</a> </li><li> <a href="clj-uuid.html#var-uuidable.3F">uuidable?</a> </li><li> <a href="clj-uuid.html#var-UUIDNameBytes">UUIDNameBytes</a> </li><li> <a href="clj-uuid.html#var-UUIDRfc4122">UUIDRfc4122</a> </li><li> <a href="clj-uuid.html#var-UUIDRfc9562">UUIDRfc9562</a> </li><li> <a href="clj-uuid.html#var-v0">v0</a> </li><li> <a href="clj-uuid.html#var-v1">v1</a> </li><li> <a href="clj-uuid.html#var-v3">v3</a> </li><li> <a href="clj-uuid.html#var-v4">v4</a> </li><li> <a href="clj-uuid.html#var-v5">v5</a> </li><li> <a href="clj-uuid.html#var-v6">v6</a> </li><li> <a href="clj-uuid.html#var-v7">v7</a> </li><li> <a href="clj-uuid.html#var-v7nc">v7nc</a> </li><li> <a href="clj-uuid.html#var-v8">v8</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.bitmop.html">clj-uuid.bitmop</a></h3><div class="doc"><pre class="plaintext">Unsigned Long and ByteBuffer-based bitwise operation primitives for
UUID manipulation.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.bitmop.html#var-assemble-bytes">assemble-bytes</a> </li><li> <a href="clj-uuid.bitmop.html#var-bit-count">bit-count</a> </li><li> <a href="clj-uuid.bitmop.html#var-buf-.3Ebytes">buf-&gt;bytes</a> </li><li> <a href="clj-uuid.bitmop.html#var-buf-.3Euuid">buf-&gt;uuid</a> </li><li> <a href="clj-uuid.bitmop.html#var-buf-compare">buf-compare</a> </li><li> <a href="clj-uuid.bitmop.html#var-buf-hex">buf-hex</a> </li><li> <a href="clj-uuid.bitmop.html#var-buf-str">buf-str</a> </li><li> <a href="clj-uuid.bitmop.html#var-buffer">buffer</a> </li><li> <a href="clj-uuid.bitmop.html#var-buffer-from-bytes">buffer-from-bytes</a> </li><li> <a href="clj-uuid.bitmop.html#var-bytes-.3Elong">bytes-&gt;long</a> </li><li> <a href="clj-uuid.bitmop.html#var-dpb">dpb</a> </li><li> <a href="clj-uuid.bitmop.html#var-dpb-buf">dpb-buf</a> </li><li> <a href="clj-uuid.bitmop.html#var-duplicate">duplicate</a> </li><li> <a href="clj-uuid.bitmop.html#var-expt2">expt2</a> </li><li> <a href="clj-uuid.bitmop.html#var-get-byte">get-byte</a> </li><li> <a href="clj-uuid.bitmop.html#var-get-int">get-int</a> </li><li> <a href="clj-uuid.bitmop.html#var-get-long">get-long</a> </li><li> <a href="clj-uuid.bitmop.html#var-get-lsb">get-lsb</a> </li><li> <a href="clj-uuid.bitmop.html#var-get-msb">get-msb</a> </li><li> <a href="clj-uuid.bitmop.html#var-get-short">get-short</a> </li><li> <a href="clj-uuid.bitmop.html#var-hex">hex</a> </li><li> <a href="clj-uuid.bitmop.html#var-hex-.3Ebuf">hex-&gt;buf</a> </li><li> <a href="clj-uuid.bitmop.html#var-ldb">ldb</a> </li><li> <a href="clj-uuid.bitmop.html#var-ldb-buf">ldb-buf</a> </li><li> <a href="clj-uuid.bitmop.html#var-long-.3Ebytes">long-&gt;bytes</a> </li><li> <a href="clj-uuid.bitmop.html#var-mask">mask</a> </li><li> <a href="clj-uuid.bitmop.html#var-mask-offset">mask-offset</a> </li><li> <a href="clj-uuid.bitmop.html#var-mask-width">mask-width</a> </li><li> <a href="clj-uuid.bitmop.html#var-octet-hex">octet-hex</a> </li><li> <a href="clj-uuid.bitmop.html#var-pphex">pphex</a> </li><li> <a href="clj-uuid.bitmop.html#var-put-byte">put-byte</a> </li><li> <a href="clj-uuid.bitmop.html#var-put-int">put-int</a> </li><li> <a href="clj-uuid.bitmop.html#var-put-long">put-long</a> </li><li> <a href="clj-uuid.bitmop.html#var-put-short">put-short</a> </li><li> <a href="clj-uuid.bitmop.html#var-sb16">sb16</a> </li><li> <a href="clj-uuid.bitmop.html#var-sb32">sb32</a> </li><li> <a href="clj-uuid.bitmop.html#var-sb64">sb64</a> </li><li> <a href="clj-uuid.bitmop.html#var-sb8">sb8</a> </li><li> <a href="clj-uuid.bitmop.html#var-set-lsb">set-lsb</a> </li><li> <a href="clj-uuid.bitmop.html#var-set-msb">set-msb</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub16">ub16</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub24">ub24</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub32">ub32</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub4">ub4</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub48">ub48</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub56">ub56</a> </li><li> <a href="clj-uuid.bitmop.html#var-ub8">ub8</a> </li><li> <a href="clj-uuid.bitmop.html#var-uuid-.3Ebuf">uuid-&gt;buf</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.clock.html">clj-uuid.clock</a></h3><div class="doc"><pre class="plaintext">Lock-Free, Thread-safe Monotonic Clocks</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.clock.html#var-.2Brandom-counter-resolution.2B">+random-counter-resolution+</a> </li><li> <a href="clj-uuid.clock.html#var-.2Bsubcounter-resolution.2B">+subcounter-resolution+</a> </li><li> <a href="clj-uuid.clock.html#var--gregorian-packed-">-gregorian-packed-</a> </li><li> <a href="clj-uuid.clock.html#var-monotonic-time">monotonic-time</a> </li><li> <a href="clj-uuid.clock.html#var-monotonic-unix-time-and-random-counter">monotonic-unix-time-and-random-counter</a> </li><li> <a href="clj-uuid.clock.html#var-posix-time">posix-time</a> </li><li> <a href="clj-uuid.clock.html#var-universal-time">universal-time</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.constants.html">clj-uuid.constants</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.constants.html#var-.2Bhex-chars.2B">+hex-chars+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bmd5.2B">+md5+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bsha1.2B">+sha1+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub1-mask.2B">+ub1-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub12-mask.2B">+ub12-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub16-mask.2B">+ub16-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub24-mask.2B">+ub24-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub32-mask.2B">+ub32-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub4-mask.2B">+ub4-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub40-mask.2B">+ub40-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub48-mask.2B">+ub48-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub56-mask.2B">+ub56-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub60-mask.2B">+ub60-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub63-mask.2B">+ub63-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-.2Bub8-mask.2B">+ub8-mask+</a> </li><li> <a href="clj-uuid.constants.html#var-hex-regex">hex-regex</a> </li><li> <a href="clj-uuid.constants.html#var-urn-regex">urn-regex</a> </li><li> <a href="clj-uuid.constants.html#var-uuid-regex">uuid-regex</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.core.html">clj-uuid.core</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.core.html#var-.2Bmax.2B">+max+</a> </li><li> <a href="clj-uuid.core.html#var-.2Bnamespace-dns.2B">+namespace-dns+</a> </li><li> <a href="clj-uuid.core.html#var-.2Bnamespace-oid.2B">+namespace-oid+</a> </li><li> <a href="clj-uuid.core.html#var-.2Bnamespace-url.2B">+namespace-url+</a> </li><li> <a href="clj-uuid.core.html#var-.2Bnamespace-x500.2B">+namespace-x500+</a> </li><li> <a href="clj-uuid.core.html#var-.2Bnull.2B">+null+</a> </li><li> <a href="clj-uuid.core.html#var-.3C">&lt;</a> </li><li> <a href="clj-uuid.core.html#var-.3D">=</a> </li><li> <a href="clj-uuid.core.html#var-.3E">&gt;</a> </li><li> <a href="clj-uuid.core.html#var-max">max</a> </li><li> <a href="clj-uuid.core.html#var-monotonic-time">monotonic-time</a> </li><li> <a href="clj-uuid.core.html#var-null">null</a> </li><li> <a href="clj-uuid.core.html#var-squuid">squuid</a> </li><li> <a href="clj-uuid.core.html#var-uuid-string.3F">uuid-string?</a> </li><li> <a href="clj-uuid.core.html#var-uuid-urn-string.3F">uuid-urn-string?</a> </li><li> <a href="clj-uuid.core.html#var-uuid-vec.3F">uuid-vec?</a> </li><li> <a href="clj-uuid.core.html#var-UUIDable">UUIDable</a> </li><li> <a href="clj-uuid.core.html#var-UUIDNameBytes">UUIDNameBytes</a> </li><li> <a href="clj-uuid.core.html#var-UUIDRfc4122">UUIDRfc4122</a> </li><li> <a href="clj-uuid.core.html#var-UUIDRfc9562">UUIDRfc9562</a> </li><li> <a href="clj-uuid.core.html#var-v0">v0</a> </li><li> <a href="clj-uuid.core.html#var-v1">v1</a> </li><li> <a href="clj-uuid.core.html#var-v3">v3</a> </li><li> <a href="clj-uuid.core.html#var-v4">v4</a> </li><li> <a href="clj-uuid.core.html#var-v5">v5</a> </li><li> <a href="clj-uuid.core.html#var-v6">v6</a> </li><li> <a href="clj-uuid.core.html#var-v7">v7</a> </li><li> <a href="clj-uuid.core.html#var-v7nc">v7nc</a> </li><li> <a href="clj-uuid.core.html#var-v8">v8</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.node.html">clj-uuid.node</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.node.html#var-.2Bclock-sequence.2B">+clock-sequence+</a> </li><li> <a href="clj-uuid.node.html#var-.2Bnode-id.2B">+node-id+</a> </li><li> <a href="clj-uuid.node.html#var-.2Bv1-lsb.2B">+v1-lsb+</a> </li><li> <a href="clj-uuid.node.html#var-.2Bv6-lsb.2B">+v6-lsb+</a> </li><li> <a href="clj-uuid.node.html#var-node-id">node-id</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.random.html">clj-uuid.random</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.random.html#var-bytes">bytes</a> </li><li> <a href="clj-uuid.random.html#var-eight-bits">eight-bits</a> </li><li> <a href="clj-uuid.random.html#var-eleven-bits">eleven-bits</a> </li><li> <a href="clj-uuid.random.html#var-long">long</a> </li><li> <a href="clj-uuid.random.html#var-ten-bits">ten-bits</a> </li><li> <a href="clj-uuid.random.html#var-twelve-bits">twelve-bits</a> </li></ul></div></div><div class="namespace"><h3><a href="clj-uuid.util.html">clj-uuid.util</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="clj-uuid.util.html#var-compile-if">compile-if</a> </li><li> <a href="clj-uuid.util.html#var-import-vars">import-vars</a> </li><li> <a href="clj-uuid.util.html#var-java6.3F">java6?</a> </li><li> <a href="clj-uuid.util.html#var-lines-of-file">lines-of-file</a> </li><li> <a href="clj-uuid.util.html#var-returning">returning</a> </li><li> <a href="clj-uuid.util.html#var-with-temp-file">with-temp-file</a> </li><li> <a href="clj-uuid.util.html#var-with-timing">with-timing</a> </li><li> <a href="clj-uuid.util.html#var-wrap-fn">wrap-fn</a> </li></ul></div></div></div></body></html>

================================================
FILE: doc/api/js/page_effects.js
================================================
function visibleInParent(element) {
    var position = $(element).position().top
    return position > -50 && position < ($(element).offsetParent().height() - 50)
}

function hasFragment(link, fragment) {
    return $(link).attr("href").indexOf("#" + fragment) != -1
}

function findLinkByFragment(elements, fragment) {
    return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first()
}

function scrollToCurrentVarLink(elements) {
    var elements = $(elements);
    var parent   = elements.offsetParent();

    if (elements.length == 0) return;

    var top    = elements.first().position().top;
    var bottom = elements.last().position().top + elements.last().height();

    if (top >= 0 && bottom <= parent.height()) return;

    if (top < 0) {
        parent.scrollTop(parent.scrollTop() + top);
    }
    else if (bottom > parent.height()) {
        parent.scrollTop(parent.scrollTop() + bottom - parent.height());
    }
}

function setCurrentVarLink() {
    $('.secondary a').parent().removeClass('current')
    $('.anchor').
        filter(function(index) { return visibleInParent(this) }).
        each(function(index, element) {
            findLinkByFragment(".secondary a", element.id).
                parent().
                addClass('current')
        });
    scrollToCurrentVarLink('.secondary .current');
}

var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }())

function scrollPositionId(element) {
    var directory = window.location.href.replace(/[^\/]+\.html$/, '')
    return 'scroll::' + $(element).attr('id') + '::' + directory
}

function storeScrollPosition(element) {
    if (!hasStorage) return;
    localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft())
    localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop())
}

function recallScrollPosition(element) {
    if (!hasStorage) return;
    $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x"))
    $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y"))
}

function persistScrollPosition(element) {
    recallScrollPosition(element)
    $(element).scroll(function() { storeScrollPosition(element) })
}

function sidebarContentWidth(element) {
    var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() })
    return Math.max.apply(Math, widths)
}

function calculateSize(width, snap, margin, minimum) {
    if (width == 0) {
        return 0
    }
    else {
        return Math.max(minimum, (Math.ceil(width / snap) * snap) + (margin * 2))
    }
}

function resizeSidebars() {
    var primaryWidth   = sidebarContentWidth('.primary')
    var secondaryWidth = 0

    if ($('.secondary').length != 0) {
        secondaryWidth = sidebarContentWidth('.secondary')
    }

    // snap to grid
    primaryWidth   = calculateSize(primaryWidth, 32, 13, 160)
    secondaryWidth = calculateSize(secondaryWidth, 32, 13, 160)

    $('.primary').css('width', primaryWidth)
    $('.secondary').css('width', secondaryWidth).css('left', primaryWidth + 1)

    if (secondaryWidth > 0) {
        $('#content').css('left', primaryWidth + secondaryWidth + 2)
    }
    else {
        $('#content').css('left', primaryWidth + 1)
    }
}

$(window).ready(resizeSidebars)
$(window).ready(setCurrentVarLink)
$(window).ready(function() { persistScrollPosition('.primary')})
$(window).ready(function() {
    $('#content').scroll(setCurrentVarLink)
    $(window).resize(setCurrentVarLink)
})


================================================
FILE: doc/apples.md
================================================
# Comparative Benchmarks: clj-uuid vs JUG vs uuid-creator vs JDK

Apples-to-apples performance comparison of UUID generation across
four JVM implementations, measured on the same machine in the same
JVM process.

## Libraries

| Library | Version | Coordinates |
|---|---|---|
| **clj-uuid** | 0.2.5-SNAPSHOT | `danlentz/clj-uuid` |
| **JUG** (FasterXML) | 5.2.0 | `com.fasterxml.uuid/java-uuid-generator` |
| **uuid-creator** (f4b6a3) | 6.1.1 | `com.github.f4b6a3/uuid-creator` |
| **JDK** | OpenJDK 25.0.1 | `java.util.UUID` (built-in) |

## Environment

- **CPU:** Intel Core i9-9880H @ 2.30 GHz (8 cores / 16 threads)
- **RAM:** 32 GB
- **OS:** macOS (Darwin 25.2.0, x86_64)
- **JVM:** OpenJDK 25.0.1 (Homebrew, mixed mode
Download .txt
gitextract_dgp_2w_6/

├── .github/
│   └── workflows/
│       └── clojure.yml
├── .gitignore
├── CHANGES.md
├── LICENSE
├── README.md
├── deps.edn
├── doc/
│   ├── api/
│   │   ├── clj-uuid.bitmop.html
│   │   ├── clj-uuid.clock.html
│   │   ├── clj-uuid.constants.html
│   │   ├── clj-uuid.core.html
│   │   ├── clj-uuid.html
│   │   ├── clj-uuid.node.html
│   │   ├── clj-uuid.random.html
│   │   ├── clj-uuid.util.html
│   │   ├── css/
│   │   │   ├── default.css
│   │   │   └── highlight.css
│   │   ├── index.html
│   │   └── js/
│   │       └── page_effects.js
│   ├── apples.md
│   ├── draft-peabody-dispatch-new-uuid-format-04.html
│   ├── java-and-unsigned-numbers.html
│   ├── perf-analysis.md
│   ├── rfc4122.txt
│   ├── rfc9562.txt
│   └── uuid-generation-benchmarks.md
├── project.clj
├── src/
│   ├── clj_uuid/
│   │   ├── bitmop.clj
│   │   ├── clock.clj
│   │   ├── constants.clj
│   │   ├── core.clj
│   │   ├── node.clj
│   │   ├── random.clj
│   │   └── util.clj
│   └── clj_uuid.clj
└── test/
    └── clj_uuid/
        ├── api_test.clj
        ├── bench.clj
        ├── bitmop_test.clj
        ├── clock_test.clj
        ├── compare_bench.clj
        ├── core_test.clj
        ├── node_test.clj
        ├── random_test.clj
        ├── util_test.clj
        ├── v1_test.clj
        ├── v3_test.clj
        ├── v4_test.clj
        ├── v5_test.clj
        ├── v6_test.clj
        ├── v7_test.clj
        ├── v7nc_test.clj
        └── v8_test.clj
Download .txt
SYMBOL INDEX (12 symbols across 1 files)

FILE: doc/api/js/page_effects.js
  function visibleInParent (line 1) | function visibleInParent(element) {
  function hasFragment (line 6) | function hasFragment(link, fragment) {
  function findLinkByFragment (line 10) | function findLinkByFragment(elements, fragment) {
  function scrollToCurrentVarLink (line 14) | function scrollToCurrentVarLink(elements) {
  function setCurrentVarLink (line 33) | function setCurrentVarLink() {
  function scrollPositionId (line 47) | function scrollPositionId(element) {
  function storeScrollPosition (line 52) | function storeScrollPosition(element) {
  function recallScrollPosition (line 58) | function recallScrollPosition(element) {
  function persistScrollPosition (line 64) | function persistScrollPosition(element) {
  function sidebarContentWidth (line 69) | function sidebarContentWidth(element) {
  function calculateSize (line 74) | function calculateSize(width, snap, margin, minimum) {
  function resizeSidebars (line 83) | function resizeSidebars() {
Condensed preview — 51 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (846K chars).
[
  {
    "path": ".github/workflows/clojure.yml",
    "chars": 784,
    "preview": "name: Clojure CI\n\non:\n  push:\n    branches:\n      - \"*\"\n  pull_request:\n    branches: [ \"master\" ]\n\njobs:\n  build:\n    r"
  },
  {
    "path": ".gitignore",
    "chars": 180,
    "preview": "/target\n/classes\n/checkouts\npom.xml\npom.xml.asc\n*.jar\n*.class\n/.lein-*\n.nrepl-port\nlpr.sh\n\ntest/new.clj\n/clj-uuid.iml\n/."
  },
  {
    "path": "CHANGES.md",
    "chars": 4279,
    "preview": "# Changes\n\n## 0.2.5\n\n### Performance\n\nThe bitmop layer has been rewritten around ByteBuffer-based primitives\nand JVM int"
  },
  {
    "path": "LICENSE",
    "chars": 11220,
    "preview": "THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC\nLICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION"
  },
  {
    "path": "README.md",
    "chars": 36946,
    "preview": "clj-uuid\n========\n\n> _\"The intent of the UUID is to enable distributed systems to uniquely_\n> _identify information with"
  },
  {
    "path": "deps.edn",
    "chars": 431,
    "preview": "{:paths [\"src\"]\n :deps  {org.clojure/clojure {:mvn/version \"1.12.0\"}\n         org.clj-commons/primitive-math {:mvn/versi"
  },
  {
    "path": "doc/api/clj-uuid.bitmop.html",
    "chars": 20410,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.bitmop documentation</title><link r"
  },
  {
    "path": "doc/api/clj-uuid.clock.html",
    "chars": 5725,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.clock documentation</title><link re"
  },
  {
    "path": "doc/api/clj-uuid.constants.html",
    "chars": 7881,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.constants documentation</title><lin"
  },
  {
    "path": "doc/api/clj-uuid.core.html",
    "chars": 34294,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.core documentation</title><link rel"
  },
  {
    "path": "doc/api/clj-uuid.html",
    "chars": 29566,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid documentation</title><link rel=\"sty"
  },
  {
    "path": "doc/api/clj-uuid.node.html",
    "chars": 4179,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.node documentation</title><link rel"
  },
  {
    "path": "doc/api/clj-uuid.random.html",
    "chars": 4898,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.random documentation</title><link r"
  },
  {
    "path": "doc/api/clj-uuid.util.html",
    "chars": 6104,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid.util documentation</title><link rel"
  },
  {
    "path": "doc/api/css/default.css",
    "chars": 7859,
    "preview": "body {\n    font-family: Helvetica, Arial, sans-serif;\n    font-size: 15px;\n}\n\npre, code {\n    font-family: Monaco, DejaV"
  },
  {
    "path": "doc/api/css/highlight.css",
    "chars": 1146,
    "preview": "/*\ngithub.com style (c) Vasily Polovnyov <vast@whiteants.net>\n*/\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  paddin"
  },
  {
    "path": "doc/api/index.html",
    "chars": 17422,
    "preview": "<!DOCTYPE html PUBLIC \"\"\n    \"\">\n<html><head><meta charset=\"UTF-8\" /><title>clj-uuid 0.2.5-SNAPSHOT</title><link rel=\"st"
  },
  {
    "path": "doc/api/js/page_effects.js",
    "chars": 3528,
    "preview": "function visibleInParent(element) {\n    var position = $(element).position().top\n    return position > -50 && position <"
  },
  {
    "path": "doc/apples.md",
    "chars": 5271,
    "preview": "# Comparative Benchmarks: clj-uuid vs JUG vs uuid-creator vs JDK\n\nApples-to-apples performance comparison of UUID genera"
  },
  {
    "path": "doc/draft-peabody-dispatch-new-uuid-format-04.html",
    "chars": 148457,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\" class=\"Internet-Draft\">\n<head>\n<meta charset=\"utf-8\">\n<meta content=\"Common,Latin\" name="
  },
  {
    "path": "doc/java-and-unsigned-numbers.html",
    "chars": 18687,
    "preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n  <head>\n    <title>Java and unsigned int, unsign"
  },
  {
    "path": "doc/perf-analysis.md",
    "chars": 28830,
    "preview": "# Performance Comparison: clj-uuid-old vs clj-uuid\n\nThis document provides a thorough analysis of the performance charac"
  },
  {
    "path": "doc/rfc4122.txt",
    "chars": 59319,
    "preview": "\n\n\n\n\n\nNetwork Working Group                                           P. Leach\nRequest for Comments: 4122               "
  },
  {
    "path": "doc/rfc9562.txt",
    "chars": 114636,
    "preview": "\n\n\n\nInternet Engineering Task Force (IETF)                          K. Davis\nRequest for Comments: 9562                "
  },
  {
    "path": "doc/uuid-generation-benchmarks.md",
    "chars": 13816,
    "preview": "# UUID Generation Benchmarks: clj-uuid-old vs clj-uuid\n\nPerformance comparison of UUID generation across all RFC 9562 ve"
  },
  {
    "path": "project.clj",
    "chars": 1614,
    "preview": "(defproject danlentz/clj-uuid \"0.2.5\"\n  :description \"A Clojure library for generation and utilization of\n              "
  },
  {
    "path": "src/clj_uuid/bitmop.clj",
    "chars": 15576,
    "preview": "(ns clj-uuid.bitmop\n  \"Unsigned Long and ByteBuffer-based bitwise operation primitives for\n  UUID manipulation.\n\n  Provi"
  },
  {
    "path": "src/clj_uuid/clock.clj",
    "chars": 6651,
    "preview": "(ns clj-uuid.clock\n  \"Lock-Free, Thread-safe Monotonic Clocks\"\n  (:require [clj-uuid.random :as random])\n  (:import [jav"
  },
  {
    "path": "src/clj_uuid/constants.clj",
    "chars": 867,
    "preview": "(ns clj-uuid.constants)\n\n\n(def +md5+  \"MD5\")\n(def +sha1+ \"SHA1\")\n\n\n(def uuid-regex  #\"[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}"
  },
  {
    "path": "src/clj_uuid/core.clj",
    "chars": 42576,
    "preview": "(ns clj-uuid.core\n  (:refer-clojure :exclude [== uuid? max < > =])\n  (:require [clojure.core :as clojure]\n            [c"
  },
  {
    "path": "src/clj_uuid/node.clj",
    "chars": 6937,
    "preview": "(ns clj-uuid.node\n  (:require [clj-uuid.util      :refer [java6? compile-if]]\n            [clj-uuid.bitmop    :refer [sb"
  },
  {
    "path": "src/clj_uuid/random.clj",
    "chars": 1865,
    "preview": "(ns clj-uuid.random\n  (:refer-clojure :exclude [bytes long])\n  (:import (java.security SecureRandom)))\n\n;;;;;;;;;;;;;;;;"
  },
  {
    "path": "src/clj_uuid/util.clj",
    "chars": 3468,
    "preview": "(ns clj-uuid.util\n  (:import (java.util UUID)))\n\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
  },
  {
    "path": "src/clj_uuid.clj",
    "chars": 2776,
    "preview": "(ns clj-uuid\n  \"RFC 9562 UUID implementation for Clojure.\n\n  This namespace re-exports all public vars from clj-uuid.cor"
  },
  {
    "path": "test/clj_uuid/api_test.clj",
    "chars": 26968,
    "preview": "(ns clj-uuid.api-test\n  (:refer-clojure :exclude [uuid? max])\n  (:require [clojure.test   :refer :all]\n            [cloj"
  },
  {
    "path": "test/clj_uuid/bench.clj",
    "chars": 7929,
    "preview": "(ns clj-uuid.bench\n  \"Benchmarks for clj-uuid UUID generation and post-generation operations.\n\n  Run:  lein test :only c"
  },
  {
    "path": "test/clj_uuid/bitmop_test.clj",
    "chars": 21170,
    "preview": "(ns clj-uuid.bitmop-test\n  (:require\n    [clojure.test    :refer :all]\n    [clj-uuid.bitmop :as b :refer :all])\n  (:impo"
  },
  {
    "path": "test/clj_uuid/clock_test.clj",
    "chars": 4308,
    "preview": "(ns clj-uuid.clock-test\n  (:require [clojure.test   :refer :all]\n            [clojure.set]\n            [clj-uuid.clock :"
  },
  {
    "path": "test/clj_uuid/compare_bench.clj",
    "chars": 5443,
    "preview": "(ns clj-uuid.compare-bench\n  \"Apples-to-apples benchmarks: clj-uuid vs JUG vs uuid-creator vs JDK.\n\n  Run:  lein test :o"
  },
  {
    "path": "test/clj_uuid/core_test.clj",
    "chars": 14159,
    "preview": "(ns clj-uuid.core-test\n  \"Tests that exercise the clj-uuid.core namespace directly.\n  Mirrors api-test but requires from"
  },
  {
    "path": "test/clj_uuid/node_test.clj",
    "chars": 375,
    "preview": "(ns clj-uuid.node-test\n  (:require [clojure.test   :refer :all]\n            [clj-uuid.node  :refer :all]))\n\n\n(deftest ch"
  },
  {
    "path": "test/clj_uuid/random_test.clj",
    "chars": 2777,
    "preview": "(ns clj-uuid.random-test\n  (:refer-clojure :exclude [bytes long])\n  (:require [clojure.test    :refer :all]\n            "
  },
  {
    "path": "test/clj_uuid/util_test.clj",
    "chars": 2824,
    "preview": "(ns clj-uuid.util-test\n  (:require [clojure.test  :refer :all]\n            [clj-uuid.util :refer :all]))\n\n(deftest check"
  },
  {
    "path": "test/clj_uuid/v1_test.clj",
    "chars": 1501,
    "preview": "(ns clj-uuid.v1-test\n  \"Time based UUIDs tests\"\n  (:require [clojure.test   :refer :all]\n            [clojure.set]\n     "
  },
  {
    "path": "test/clj_uuid/v3_test.clj",
    "chars": 24343,
    "preview": "(ns clj-uuid.v3-test\n  (:refer-clojure :exclude [uuid? max])\n  (:require [clojure.test   :refer :all]\n            [clj-u"
  },
  {
    "path": "test/clj_uuid/v4_test.clj",
    "chars": 610,
    "preview": "(ns clj-uuid.v4-test\n  \"Random UUIDs tests\"\n  (:refer-clojure :exclude [uuid? max])\n  (:require [clojure.test :refer :al"
  },
  {
    "path": "test/clj_uuid/v5_test.clj",
    "chars": 24344,
    "preview": "(ns clj-uuid.v5-test\n  (:refer-clojure :exclude [uuid? max])\n  (:require [clojure.test   :refer :all]\n            [clj-u"
  },
  {
    "path": "test/clj_uuid/v6_test.clj",
    "chars": 1477,
    "preview": "(ns clj-uuid.v6-test\n  \"Time based UUIDs tests\"\n  (:require [clojure.test   :refer :all]\n            [clojure.set]\n     "
  },
  {
    "path": "test/clj_uuid/v7_test.clj",
    "chars": 1579,
    "preview": "(ns clj-uuid.v7-test\n  (:require [clojure.test   :refer :all]\n            [clojure.set]\n            [clj-uuid :as uuid :"
  },
  {
    "path": "test/clj_uuid/v7nc_test.clj",
    "chars": 1715,
    "preview": "(ns clj-uuid.v7nc-test\n  (:require [clojure.test :refer :all]\n            [clojure.set]\n            [clj-uuid :as uuid :"
  },
  {
    "path": "test/clj_uuid/v8_test.clj",
    "chars": 594,
    "preview": "(ns clj-uuid.v8-test\n  \"Custom UUIDs tests\"\n  (:refer-clojure :exclude [uuid? max])\n  (:require [clojure.test :refer :al"
  }
]

About this extraction

This page contains the full source code of the danlentz/clj-uuid GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 51 files (791.3 KB), approximately 243.6k tokens, and a symbol index with 12 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!