<?php require_once 'Crypt/MicroID.php'; try { $microID = Crypt_MicroID::generate('xmpp:stpeter@jabber.org', 'https://www.xmpp.net/'); echo $microID; } catch (Crypt_MicroID_AlgorithmNotFoundException $e) { echo $e->getMessage(); } ?>
string generate( string $identity, string $service, [string $algorithm = self::ALGORITHM], [boolean $legacy = false])
boolean verify( string $identity, string $service, string $microID)
The provided ID can be in the legacy format (without URI types or algorithm), in which case the SHA1 algorithm will be assumed.