ARCcore.identifier Library Documentation
Login
-Home
/
-Documentation
/
-ARCcore
/
-identifier
-identifier
+graph
+filter
+discriminator
+types
+util
API
Examples
ARCcore.identifier Library Documentation
ARCcore.identifier library provides functions for creating UUID's and Murmur-3 derived digest hashes.

identifier Library Introduction

ARCcore.identifier provides functions for generating 22-character, 128-bit unique identifiers called Internet Routable URI Tokens (IRUT's) from in-memory data. Or, from a random v4 UUID.

IRUT's

When generating an IRUT from in-memory data, the Murmur3 non-cryptographic digest hash algorithm is used to create a 128-bit numerical value using the murmurhash-js package.

When generating a random IRUT, the 128-bit numerical value is obtained using the uuid package.

In both cases the 128-bit numerical value is converted to an IRUT by:

  • base64 encoding the numerical value
  • trimming insigificant = characters from the end of base64 string
  • globally substituting / characters with _ (underscore)
  • globally substituting + characters with - (hypen)

The character substitutions are made to ensure that IRUT strings do not contain any of the characters reserved by the Universal Resource Identifier specification. See: RFC3986 (section 2.3).

Short IRUT's

Infrequently used but occasionally useful (e.g. tiny URL's), ARCcore.identifier additionally provides a variant of the algorithm above for generating 6-character, 32-bit unique IRUT strings.

ARCcore.identifier Exports

$ node
> const arccore = require('arccore');
undefined
> arccore.identifier
{ hash:
   { fromUTF8: [Function],
     fromReference: [Function],
     toIRUT: [Function] },
  irut:
   { fromEther: [Function],
     fromReference: [Function],
     isIRUT: [Function] } }
>

Note that at present, the ARCcore distribution package bundles both the murmurhash-js and uuid packages via webpack so as to maintain zero external dependencies. If you're using the ARCcore package, save space by picking up these dependencies via convenience export namespace arccore.__bundle.

identifier Library Details

API - ARCcore.identifier Library API Reference
ARCcore.identifier library API reference.
Examples - ARCcore.identifier Library Examples
ARCcore.identifier library examples.
Encapsule Project, Seattle WA
Copyright © 2018 Chris Russell
Sat Dec 15 2018 03:32:28 GMT-0500 (EST)

Encapsule/holism v0.0.26
Documents Under Contruction