@param string $indexId
The unique identifier of the index, e.g. ABCD-12345.

@return string
426864
public function generate($indexId)
    {
        $string = $indexId . 'solr' . $this->salt;
        return hash_hmac('sha1', str_pad($string, 80, $string), $this->networkKey);
    }
1171665
protected function doRead($sessionId): string
    {
        try {
            $this->sessionDataProvider = $this->getFacade()->get($this->prefix . $sessionId);
        } catch (RedisException $exception) {
            $this->sessionDataProvider->setData('');
        }

        return $this->sessionDataProvider->getData();
    }
1364552
static public function getPrefixFromId($networkId)
    {
        foreach (self::$networkInfos as $name => $spec) {
            if ($networkId === $spec['id'])
                return $spec['hex'];
        }

        throw new NISInvalidNetworkId("Network Id '" . $networkId . "' is invalid.");
    }
1368794
protected function normalizeId($id)
    {
        if (null !== $this->getSessionPrefix()) {
            return $this->getSessionPrefix() . self::ID_SEPARATOR . $id;
        }

        return $id;
    }
1162560
public function getIndexOptions($indexData)
    {
        $options = [];

        if (isset($indexData['Key_name'])) {
            $options[] = '\'name\' => "' . $indexData['Key_name'] . '"';
        }
        if (isset($indexData['Non_unique']) && $indexData['Non_unique'] == 1) {
            $options[] = '\'unique\' => false';
        } else {
            $options[] = '\'unique\' => true';
        }
        /*
         * Number of characters for nonbinary string types (CHAR, VARCHAR, TEXT)
         * and number of bytes for binary string types (BINARY, VARBINARY, BLOB)
         */
        if (isset($indexData['Sub_part'])) {
            $options[] = '\'limit\' => ' . $indexData['Sub_part'];
        }
        // MyISAM only
        if (isset($indexData['Index_type']) && $indexData['Index_type'] == 'FULLTEXT') {
            $options[] = '\'type\' => \'fulltext\'';
        }
        $result = '[' . implode(', ', $options) . ']';

        return $result;
    }
651272
public static function niceidformat($someid)
	{
		$prfx = '';
		if (substr($someid, 0, 1) == '-')
		{
			$prfx = 'n';
			$someid = substr($someid, 1);
		}
		while (strlen($someid) < 5)
		{
			$someid = 0 . "$someid";
		}
		return $prfx . $someid;
	}
1359061
public function getDropIndexDDL(Index $index)
    {
        $pattern = "
DROP INDEX %s;
";

        return sprintf($pattern,
            $this->quoteIdentifier($index->getFQName())
        );
    }
112665
protected function getFilename($id)
    {
        $hash = hash('sha256', $id);

        // This ensures that the filename is unique and that there are no invalid chars in it.
        if ($id === ''
            || ((strlen($id) * 2 + $this->extensionStringLength) > 255)
            || ($this->isRunningOnWindows && ($this->directoryStringLength + 4 + strlen($id) * 2 + $this->extensionStringLength) > 258)
        ) {
            // Most filesystems have a limit of 255 chars for each path component. On Windows the the whole path is limited
            // to 260 chars (including terminating null char). Using long UNC ("\\?\" prefix) does not work with the PHP API.
            // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259.
            // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents
            // collisions between the hash and bin2hex.
            $filename = '_' . $hash;
        } else {
            $filename = bin2hex($id);
        }

        return $this->directory
            . DIRECTORY_SEPARATOR
            . substr($hash, 0, 2)
            . DIRECTORY_SEPARATOR
            . $filename
            . $this->extension;
    }
1272565
public function getAddIndexDDL(Index $index)
    {
        // don't create index form primary key
        if ($this->getPrimaryKeyName($index->getTable()) == $this->quoteIdentifier($index->getName())) {
            return '';
        }

        $pattern = "
CREATE %sINDEX %s ON %s (%s)%s;
";

        return sprintf($pattern,
            $index->isUnique() ? 'UNIQUE ' : '',
            $this->quoteIdentifier($index->getName()),
            $this->quoteIdentifier($index->getTable()->getName()),
            $this->getColumnListDDL($index->getColumnObjects()),
            $this->generateBlockStorage($index)
        );
    }
662359
function samlCreateId() 
   {
      $rndChars = 'abcdefghijklmnop';
      $rndId = '';
      for ($i = 0; $i < 40; $i++ ) {
         $rndId .= $rndChars[rand(0,strlen($rndChars)-1)];
      }
      return $rndId;
   }
334902
public function getBy(string $indexId, string $key)
    {
        if (!isset($this->indexes[$indexId])) {
            throw new InvalidMapIndex($indexId);
        }

        return $this->get($this->indexes[$indexId]->get($key));
    }
766453
private static String getFullInstanceId(String hostname, String id) {
    String str = hostname == null ? "" : hostname;
    str = str.replace('.', '_');
    str += (id == null ? "" : "-" + id);
    return str;
  }
741189
public function get_id_by_bit(string $id): ?string
  {
    if ( \bbn\str::is_uid($id) && ($p = $this->get_by_bit($id)) ){
      return $p[$this->fields['id']];
    }
    return null;
  }
760877
public function getIndexName(): string
    {
        $indexName = $this->searchClient->getIndexName();
        if ($this->indexNamePostfix !== '') {
            $indexName .= '-' . $this->indexNamePostfix;
        }

        return $indexName;
    }
945871
public function prepareIndexStatement(IndexInterface $index)
    {
        switch ($index->getIndexType()) {
            case IndexInterface::PRIMARY:
                $result = 'PRIMARY KEY';
                break;
            case IndexInterface::UNIQUE:
                $result = 'UNIQUE ' . $this->getConnection()->escapeFieldName($index->getName());
                break;
            case IndexInterface::FULLTEXT:
                $result = 'FULLTEXT ' . $this->getConnection()->escapeFieldName($index->getName());
                break;
            default:
                $result = 'INDEX ' . $this->getConnection()->escapeFieldName($index->getName());
                break;
        }

        return $result . ' (' . implode(', ', array_map(function ($field_name) {
            return $this->getConnection()->escapeFieldName($field_name);
        }, $index->getFields())) . ')';
    }
930616
public function getSignature($signatureId)
    {
        foreach ($this->getSignatures() as $signature) {
            if ($signature->getId() === $signatureId) {
                return $signature;
            }
        }
    }
395599
private String generateIncrementedId (String componentId) {
        Integer serialNum = (Integer) context.getAttributes().get(componentId);
        if (null == serialNum) {
            serialNum = 1;
        } else {
            serialNum = serialNum.intValue() + 1;
        }
        context.getAttributes().put(componentId, serialNum);
        componentId = componentId + UNIQUE_ID_PREFIX + serialNum.intValue();
        return componentId;
    }