Implementations
- ActionScript
- CASA Lib provides a Version 4 UUID function as part of the StringUtil class. Adobe Flex also provides a UUID implementation with the UIDUtil class.
- Apache Solr
- Solr contains a uuid data type.
- C
- libuuid is part of the e2fsprogs package. The OSSP project provides a UUID library.
- C++
- Object Oriented ID provides a C++ concrete type (much like a built-in type or a C# struct). QUuid is part of the C++ Qt framework. Boost.Uuid is a header-only implementation under a non-reciprocal Open Source license.
- Caché ObjectScript
- UUID Version 4 implementation for Caché ObjectScript.
- CakePHP
- Cakephp will automatically generate UUIDs for new records if the table's primary key data type is set to CHAR(36).
- Cocoa/Carbon (Mac OS X)
- The Core Foundation class CFUUIDRef is used to produce and store UUIDs, as well as to convert them to and from CFString/NSString representations.
- CodeGear RAD Studio (Delphi/C++ Builder)
- A new GUID can be generated by pressing Ctrl+Shift+G. For runtime functions see the "Free Pascal & Lazarus IDE" section.
- ColdFusion
- The createUUID function provides a UUID in all versions, however the format generated is in four segments instead of five xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx (8-4-4-16).
- Common Lisp
- Two libraries are available to create UUIDs according to RFC 4122. A generalized library for creation of UUIDs (v1, v3, v4 and v5). Unicly which is optimized for creation of UUIDs (v3, v4, and v5) and offers an extended interface for converting among different representations and interrogating UUID equivalence across these different representations.
- CouchDB
- If not provided, CouchDB sets the document ID for each document to be a UUID
- D
- The Tango standard library includes a module to create UUIDs (v3, v4, and v5) according to RFC 4122.
- Eiffel
- A library is available to create UUIDs Generates uuids according to RFC 4122, Variant 1 0, Version 4. Source available at Eiffel UUID library
- Erlang
- For Erlang there is erlang-uuid written in Erlang that implements UUID generation for variant 1 0, versions 1, 3, 4, and 5 from RFC 4122. The library also contains functions for converting between string and binary formats, creating a UUID URN, and returning node id.
- Firebird Server
- Firebird has gen_uuid from version 2.1 and uuid_to_char and char_to_uuid from version 2.5 as built-in functions.
- Free Pascal & Lazarus IDE
- In Free Pascal there is a class called TGUID that holds the structure of a UUID. Also in the SysUtils.pas unit there are methods to create, compare and convert UUID's. They are CreateGUID, GUIDToString and IsEqualGUID. In the Lazarus IDE you can also generate a UUID by pressing Ctrl+Shift+G.
- Haskell
- The package uuid directly implements most of RFC 4122. The package supports generation (v1, v3, v4 and v5) as well as serialization to and from string and binary formats. The package system-uuid provides bindings to the native UUID generators on Windows, Linux, FreeBSD and Mac OS X.
- Haxe
- Haxe functions which generate version 4 UUIDs as defined in the RFC 4122 specification.
- Java
- The J2SE 5.0 release of Java provides a class that will produce 128-bit UUIDs, although it only implements version 3 and 4 generation methods, not the original method (due to lack of means to access MAC addresses using pure Java before version 6). The API documentation for the
java.util.UUID
class refers to ISO/IEC 11578:1996. Open source implementations supporting MAC addresses on several common operating systems are UUID – generate UUIDs (or GUIDs) in Java and Java Uuid Generator (JUG). - JavaScript
- Broofa.com has implemented a JavaScript function which generates version 4 UUIDs as defined in the RFC 4122 specification. An open source library UUID.js, which is available under the MIT license, generates version 4 and version 1 UUIDs according to RFC 4122.
- KohanaPHP
- The Kohana PHP Framework, supports the generation of version 3, 4, and 5 UUIDs according to RFC 4122 specifications using the UUID module.
- Lasso
- A custom tag for Lasso 8+ by Douglas Burchard, an LJAPI-module by Steffan A. Cline, also for Lasso 8+. Lasso 9's implementation of Lasso_UniqueID also returns a UUID.
- Lua
- There is a Lua module by Luiz Henrique de Figueiredo.
- Mac OS X
- Command line utility uuidgen is available. In the Terminal application, type: uuidgen
- MySQL
- MySQL provides a UUID function.
- .NET Framework
- The .NET Framework also provides a structure
System.Guid
to generate and manipulate 128-bit UUIDs. - OCaml
- The uuidm library implements universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122.
- Oracle Database
- The Oracle Database provides a function
SYS_GUID
to generate unique identifiers. - Perl
- The
Data::UUID
andData::GUID
modules from CPAN can be used to create UUIDs. TheUUID::Tiny
module is a lightweight, low dependency Pure Perl module for UUID creation and testing. - PHP
- In PHP there are several modules for creating UUIDs.
- PostgreSQL
- PostgreSQL contains a uuid data type. Also various generation functions as part of the uuid-ossp contrib module.
- Progress OpenEdge ABL
- The
GENERATE-UUID
function in OpenEdge 10 provides a UUID which can be made printable using theGUID
orBASE64-ENCODE
functions. - Python
- The uuid module (included in the standard library since Python 2.5) creates UUIDs according to RFC 4122.
- Revolution/RunRev
- The libUUID library A library that generates UUIDs of type 1 (time based), type 3 (name-based) and type 4 (random-based). Version 1.0. by Mark Smith. OSL 3.0
- Ruby
- There are several RFC4122 implementations for Ruby, the most updated ones being Ruby-UUID (fork here ), UUID and UUIDTools. Ruby 1.9 includes a built-in version 4 uuid generator (
SecureRandom.uuid
). - SAP BusinessObjects Data Services
- The ETL tool SAP BusinessObjects Data Services contains a function to generate a UUID:
gen_uuid
. - SQL Server
- Transact-SQL (2000 and 2005) provides a function called NEWID to generate unique identifiers. SQL Server 2005 provides an additional function called NEWSEQUENTIALID which generates a new GUID that is greater than any GUID previously created by the NEWSEQUENTIALID function on a given computer.
- Tcl
- A Tcl implementation is provided in the TclLib package.
- Unix
- Command line utility uuidgen may be provided by default. There is also a tool called simply "uuid" available, which has the same functionality. The FreeBSD and Linux kernels have a built-in UUID v4 generator too. To use this on Linux, you have to read the file /proc/sys/kernel/random/uuid. On FreeBSD there is a simple system callL uuidgen(2).
Read more about this topic: Universally Unique Identifier