Giter Site home page Giter Site logo

person-uuid's Introduction

Build Status

UUID encoding of Swedish identity numbers.

An encoding of Swedish identity numbers for organisations, individuals, etc. in a Version 1 date-time and MAC address UUID. The MAC address is fixed and uniquely identifies this UUID as encoding a Swedish identity number. In addition the least significant bit of N must be set to 1.

The identity number is stored in the time_low and time_mid fields encoded with 4 bits per digit to be readable as the original identity in the canonical UUID hex representation.

A serial number is stored in time_hi to support multiple businesses registered to the same individual natural person.

                        ________________   _______________
                       /                \ /               \
                       00112233 4455 6677 8899 aabbccddeeff
                       -------- ---- ---- ---- ------------
                       xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
                       iiiiiiii-iiii-1nnn-9xxx-d49a20d06c1a
                       \___________/ |\_/ |  | \__________/
                             |       | |  |  |       |
                         id number   | |  |  | fixed MAC address
      stored as 1 digit per nybble   | |  |  |
                                     | |  |  |
version 1: date-time and MAC address / |  |  |
                                       |  |  |
                         serial number /  |  |
                                          |  |
   variant 1: 10x with x=0 -> 100 (hex 8) |  |
    lsb of N = 1, yielding N=1001 (hex 9) /  |
                                             |
                     x=reserved (must be 0)  /

Examples

Enterprise identity number: 00556809-9963-1000-9000-d49a20d06c1a

Social security number: 19410617-7753-1000-9000-d49a20d06c1a

person-uuid's People

Contributors

aenlr 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.