add some shtuff

This commit is contained in:
abbie 2024-08-01 12:05:38 +01:00
parent 1eb50fab4f
commit 9f5a4d837e
Signed by: threeoh6000
GPG key ID: 801FE4AD456E922C

View file

@ -7,10 +7,18 @@ function randomLongHex() {
return bin2hex($byt);
}
function uuid4() {
function genUuid4() {
$template = randomLongHex();
$buildup = substr($template, 0, 8) . "-" . substr($template, 8, 4) . "-4" . substr($template, 13, 3) . "-1" . substr($template, 17, 3) . "-" . substr($template, 20, 12);
return $buildup;
}
function nilUuid() {
return "00000000-0000-0000-0000-000000000000";
}
function omniUuid() {
return "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF";
}
?>