Giter Club home page Giter Club logo

local-ids's Introduction

Local IDs

Experiments in creating useful, locally-unique random IDs, in multiple languages.

A local ID is designed to have a compact string representation using 16 base-62 characters. Base 62 comprises only English alphabetic characters and numerals (i.e. [0-9A-Za-z]).

Example string values are: XDC9uT4O0PS5q1O5, me1KOWmWGjqv5XHa, W4n9Sj84Tv4f81HQ, quayf5S8Xua9Xnqw.

Each ID has 15 characters of random data and one check character, derived from the first 15.

This provides an approximately 90-bit random space. (For comparison, UUIDs are random in 128-bit space.)

Design goals

  • Compact string representation using only letters and numbers.
  • Sufficient random space to be unique enough for most uses.
  • Validity check to catch guessing attempts without needing to query existing values in a database (for example, if used to generate links like https://example.com/l/4jfPi9y19fyv1O0n).

Current implementations

local-ids's People

Contributors

mjstrasser avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.