• Stars
    star
    213
  • Rank 178,823 (Top 4 %)
  • Language
    Erlang
  • License
    MIT License
  • Created about 13 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Erlang Native UUID Generation

Erlang UUID Implementation

Build Status

http://www.ietf.org/rfc/rfc4122.txt is the reference for official UUIDs. This implementation provides a version 1 UUID that includes both the Erlang pid identifier (ID, Serial, Creation) and the distributed Erlang node name within the 48 bit node ID. To make room for the Erlang pid identifier, the 48 bits from the MAC address (i.e., 3 OCI (Organizationally Unique Identifier) bytes and 3 NIC (Network Interface Controller) specific bytes) and the distributed Erlang node name are bitwise-XORed down to 16 bits. The Erlang pid is bitwise-XORed from 72 bits down to 32 bits. The version 3 (MD5), version 4 (random), and version 5 (SHA) methods are provided as specified within the RFC.

Requires Erlang >= R16B01

Usage

Certain uuid functions require initializing the Erlang process before the function is called. The initialization ensures the quickrand dependency is able to provide randomness for the uuid module use.

If you use the functions uuid:new/1, uuid:new/2 or uuid:get_v4_urandom/0, you should call the function quickrand:seed/0 or quickrand:seed/1 first.

If you use the function uuid:get_v4/1 with a cached argument, you should call the function quickrand_cache:init/0 or quickrand_cache:init/1 first. If you use the function uuid:get_v4/1 with quickrand_cache state, you would have called the function quickrand_cache:new/0 or quickrand_cache:new/1 first. Using the quickrand_cache init function means cached random data is stored in the process dictionary and using the quickrand_cache new function (instead of init) means cached random data is kept in a state variable.

Build

rebar get-deps
rebar compile

Author

Michael Truog (mjtruog at protonmail dot com)

License

MIT License

More Repositories

1

pqueue

Erlang Priority Queues
Erlang
169
star
2

trie

Erlang Trie Implementation
Erlang
130
star
3

pest

🪲 Primitive Erlang Security Tool
Erlang
99
star
4

cpg

CloudI Process Groups
Erlang
92
star
5

GEPD

Generic Erlang Port [Driver]: Automatically generate an Erlang port driver or Erlang port for C/C++ bindings using a single self-contained file, and easily switch between either.
C++
81
star
6

quickrand

Quick Erlang Random Number Generation
Erlang
43
star
7

erlang_py

Erlang External Term Format for Python
Python
36
star
8

erlang_js

Erlang External Term Format for Javascript
JavaScript
34
star
9

erlang_term

Erlang Term Info
Erlang
34
star
10

erlbench

Erlang Performance Measurements
Erlang
34
star
11

erlang_ml

Erlang External Term Format for OCaml
OCaml
28
star
12

reltool_util

Erlang reltool utility functionality application
Erlang
26
star
13

varpool

Erlang Process Pools as a Local Variable
Erlang
19
star
14

erlang_go

Erlang External Term Format for Go
Go
19
star
15

cgroups

Erlang native cgroups interface
Erlang
12
star
16

sillymud

SillyMUD codebase as a CloudI Service
C
11
star
17

erlang_php

Erlang External Term Format for PHP
PHP
10
star
18

erlang_rb

Erlang External Term Format for Ruby
Ruby
10
star
19

key2value

Erlang 2-way map
Erlang
7
star
20

syslog_socket

Erlang syslog Client Interface
Erlang
7
star
21

supool

Erlang Process Pool as a Supervisor
Erlang
5
star
22

record_info_runtime

Parse transform for using record_info(size, _) and record_info(fields, _) during runtime
Erlang
5
star
23

nd_index

Erlang N-dimensional Index Iterator
Erlang
4
star
24

erlang_hs

Erlang External Term Format for Haskell
Haskell
4
star
25

erlang_pl

Erlang External Term Format for Perl
Perl
3
star
26

effects

An experimental C++ runtime effect system
C++
1
star
27

odroid_fish

Make service requests swim!
Python
1
star
28

blookup

Binary Lookup Data Structure
Erlang
1
star
29

odroid_display

Odroid-C1 Display Service for CloudI
C
1
star
30

exometer

Basic measurement objects and probe behavior (for https://github.com/CloudI/cloudi_service_monitoring)
Erlang
1
star
31

keys1value

Erlang set associative map for key lists
Erlang
1
star
32

unicode_data

Unicode for Erlang/Elixir
Erlang
1
star
33

lens

Erlang templates lens example
Erlang
1
star