public static function GUIDv5($namespace, $name)
    {
        if (!Validate::isGuid($namespace)) {
            return false;
        }

        $nHex = str_replace(['-', '{', '}'], '', $namespace);
        $nStr = '';

        $nHexLen = \strlen($nHex);
        for ($i = 0; $i < $nHexLen; $i += 2) {
            $nStr .= \chr(\intval($nHex[$i] . $nHex[$i + 1], 16));
        }

        $hash = sha1($nStr . $name);

        return sprintf(
            '%08s-%04s-%04x-%04x-%12s',
            substr($hash, 0, 8),
            substr($hash, 8, 4),
            (\intval(substr($hash, 12, 4), 16) & 0x0fff) | 0x5000,
            (\intval(substr($hash, 16, 4), 16) & 0x3fff) | 0x8000,
            substr($hash, 20, 12)
        );
    }