@param string $shortUuid

@return string
495970
public function expand(string $shortUuid): string
    {
        $number = new BigNumber(0);
        foreach (str_split(strrev($shortUuid)) as $char) {
            $number
                ->multiply($this->dictionary->getLength())
                ->add($this->dictionary->getCharIndex($char));
        }

        $hex = $this->converter->toHex($number);
        $expandedUUID = $this->formatHex($hex);

        return $expandedUUID;
    }
1212360
public static function getByUuid(string $uuid): ?WebhookEvent
    {
        $event = WebhookEvent::get("/webhook-events/:uuid", [ "uuid" => $uuid ])->first();

        /** @var WebhookEvent $event */
        return $event;
    }
79475
public function getUuid() : ?string 
    {
        if ( ! $this->hasUuid()) {
            $this->setUuid($this->getDefaultUuid());
        }
        return $this->uuid;
    }
1322964
def short_token():
    
    hash = hashlib.sha1(shortuuid.uuid())
    hash.update(settings.SECRET_KEY)
    return hash.hexdigest()[::2]
916788
public function _generateUUIDString() {
        return sprintf("%08x%08x%08x%08x",
            $this->_util->randInt32(),
            $this->_util->randInt32(),
            $this->_util->randInt32(),
            $this->_util->randInt32()
        );
    }
881768
public function convertToCompliantUuid($uuid=false){
        $id = ($uuid?$uuid:$this->uuid);
        $arr = [8, 13, 18, 23];
        foreach ($arr as $part){
            $id = substr_replace($id, '-', $part, 0);
        }
        return $id;
    }
1006823
protected function prepareEventType($uuid) {
    $value = NULL;
    $terms = $this->termStorage->loadByProperties([
      'uuid' => $uuid,
    ]);

    if ($terms) {
      $value = [
        [
          'target_id' => current($terms)->id(),
        ],
      ];
    }

    return $value;
  }
578346
public static function getShortPinyin($string, $encoding = 'utf-8')
    {
        if ($string != self::$string || $encoding != self::$encoding) {
            self::chineseToPinyin($string, $encoding);
        }
        return self::$short_pinyin;
    }
464384
public function get_details($short = '') {
        global $DB, $OUTPUT;
        $output = array();
        foreach ($this->params as $p) {
            $cohortname = $DB->get_field('cohort', 'name', array('id' => $p['cohort']));
            if (!$cohortname) {
                $str = $OUTPUT->error_text(get_string('error:nosuchcohort', 'badges'));
            } else {
                $str = html_writer::tag('b', '"' . format_string($cohortname, true) . '"');
            }
            $output[] = $str;
        }

        if ($short) {
            return implode(', ', $output);
        } else {
            return html_writer::alist($output, array(), 'ul');
        }
    }
1301130
public function encode(UuidInterface $uuid)
    {
        $sixPieceComponents = array_values($uuid->getFieldsHex());

        $this->swapTimestampAndRandomBits($sixPieceComponents);

        return vsprintf(
            '%08s-%04s-%04s-%02s%02s-%012s',
            $sixPieceComponents
        );
    }
8952
public function decode($encodedUuid)
    {
        $components = $this->extractComponents($encodedUuid);
        $fields = $this->getFields($components);

        return $this->builder->build($this, $fields);
    }
588921
public function shortName($name = null)
    {
        if ($name === null) {
            return $this->_nameShort;
        }
        $this->_nameShort = $name;

        return $this;
    }
505071
public function short(): string
    {
        if ($this->isPrimitive()) {
            return (string) $this->phpType;
        }

        return (string) $this->className->short();
    }
148025
private function uuid(): string
    {
        return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
            mt_rand(0, 0xffff), mt_rand(0, 0xffff),
            mt_rand(0, 0xffff),
            mt_rand(0, 0x0fff) | 0x4000,
            mt_rand(0, 0x3fff) | 0x8000,
            mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
        );
    }
1216721
public function getMetric($uuid)
    {
        $response = $this->client->get(sprintf('metrics/%s', $uuid));

        return json_decode($response->getBody(true), true);
    }
395200
public function show($uuid)
    {
        if ($uuid instanceof Service) {
            $uuid = $uuid->getUuid();
        }

        $response = $this->httpClient->get(
            $this->getResourceUrl($uuid),
            []
        );

        return ServiceResponse::createFromHttpResponse($response);
    }
661326
public function shortName()
    {
        $id = $this->getModuleId();
        $p  = strrpos($id, '.');

        return $p ? substr($id, $p + 1) : $id;
    }