Icon

Partager Envoyer

(Document)

Bibliothèque de génération d'identifiants uniques universels (Uuid)

La bibliothèque Uuid permet la création d'UUIDs v4 (aléatoires), v3 (MD5 hash) et v5 (SHA-1 hash).

Files

libraries/Uuid.php

Utilisation

//Load library
$this->load->library('Uuid');

//Output a v4 UUID 
echo $this->uuid->v4(); 

//Output a v3 UUID from a name and namespace (if a valid UUID namespace is omitted, a v4 generated UUID will be used)
echo $this->uuid->v3('My Name', '8d3dc6d8-3a0d-4c03-8a04-1155445658f7'); 
echo $this->uuid->v3('My Name'); 

//Output a v5 UUID from a name and namespace (if a valid UUID namespace is omitted, a v4 generated UUID will be used)
echo $this->uuid->v5('My Name', '8d3dc6d8-3a0d-4c03-8a04-1155445658f7'); 
echo $this->uuid->v5('My Name'); 

Pour plus d'informations sur UUID, consultez la page http://en.wikipedia.org/wiki/Universally_unique_identifier

Crédits

Voir https://github.com/Repox/codeigniter-uuid

 


Ce document a été publié le 2018-12-09 07:46:34. (Dernière mise à jour : 2018-12-28 17:13:38.)




This website uses 'cookies' to enhance user experience and provide authentification. You may change which cookies are set at any time by clicking on more info. Accept
x