Deletes the content with the specified hash from the registry.
@param string $hash
198855
protected function deleteContent(string $hash): void
    {
        $this->adapter->delete($this->namespace, $hash);
        unset($this->cache[$hash]);
    }
763876
public function setHash($hash)
    {
        if (!is_string($hash)) {
            throw new \InvalidArgumentException(
                'An invalid $hash was passed to Identicon. ' .
                'A binary string was expected.');
        }
        if (strlen($hash) < 6) {
            throw new \InvalidArgumentException(
                'An invalid $hash was passed to Identicon. ' . 
                'The hash was expected to contain at least 6 bytes.');
        }
        
        $this->hash = $hash;
        $this->value = null;
        $this->valueSet = false;
        return $this;
    }
164084
private function removeExisting(Lucene\Index $index, $hash)
    {
        try {
            $hits = $index->find(self::HASH_FIELDNAME . ':' . $hash);
            foreach ($hits as $hit) {
                $index->delete($hit->id);
            }
        } catch (\Exception $ex) {
            // FIXME no result ???
        }
    }
398609
public function logout($hash)
    {
        if (strlen($hash) != self::HASH_LENGTH) {
            return false;
        }

        $this->isAuthenticated = false;
        $this->currentuser = null;

        return $this->deleteSession($hash);
    }
1117187
protected function deleteSession($hash)
    {
        $query = "DELETE FROM {$this->config->table_sessions} WHERE hash = :hash";
        $query_prepared = $this->dbh->prepare($query);
        $query_prepared->execute(['hash' => $hash]);
        return $query_prepared->rowCount() == 1;
    }
1263858
public function needsRehash(string $hash): bool
    {
        if (!$this->isLoggedIn()) {
            return false;
        }

        return password_needs_rehash(
            $hash,
            PASSWORD_DEFAULT,
            ['cost' => self::PASSWORD_COST]
        );
    }
322070
public function delete($key)
    {
        if (isset($this->data[$key])) {
            unset($this->data[$key]);
            $this->root->updated = true;
            $this->root->update();
        }
    }
53417
protected function setHashingAndSave($hash)
    {
        // Set hashing state
        $hashing = $this->getHashing();
        $this->setHashing($hash);

        // Save the model
        $result = $this->save();

        // Reset hashing back to it's previous state
        $this->setHashing($hashing);

        return $result;
    }
809945
public function isStored($hash)
    {
        $modified = file_exists($hash) ? filemtime($hash) : 0;
        if ($modified) {
            $this->updateRegistry();
            $md5hash = HashHandler::getInstance()->calculate($hash);
            if (isset($this->storage[$md5hash])) {
                if (0 === $modified) return false;
                if ($this->storage[$md5hash] >= $modified) {
                    return true;
                }
            }
        }
        return false;
    }
129942
public function delete($key)
    {
        $this->setScope($key);
        parent::delete($key);
        /** @noinspection PhpInternalEntityUsedInspection */
        $this->key = null;
    }
86567
public function set(string $hash, string $content): void
    {
        $this->saveContent($hash, $content);
    }
204043
public static function deleteTransaction($hash) {

        $transaction = Transaction::find()->withTransactionPartAndHash($hash)->one();

        if ($transaction === null) {
          throw new Exception("Transaction with hash " . $hash . " not found.");
        }

        $dbTransaction = \Yii::$app->db->beginTransaction();
        try {
            foreach ($transaction->transactionParts as $tp) {
                TransactionPersistance::setAccountBalance($tp->account_id, $tp->accountside_id, $tp->value, true);
            }
            $id = $transaction->transaction_id;
            TransactionPart::deleteAll(['transaction_id' => $transaction->transaction_id]);
            Transaction::deleteAll(['transaction_id' => $transaction->transaction_id]);
            
            $dbTransaction->commit();
            return $id;
        } catch (Exception $e) {
            $dbTransaction->rollBack();
            throw $e;
        }
    }
330908
protected static function truncateHash($hash)
    {
        $offset = ord($hash[19]) & 0xf;
        $value  = (ord($hash[$offset + 0]) & 0x7f) << 24;
        $value |= (ord($hash[$offset + 1]) & 0xff) << 16;
        $value |= (ord($hash[$offset + 2]) & 0xff) << 8;
        $value |= (ord($hash[$offset + 3]) & 0xff);

        return $value;
    }
847595
protected function setHashInEnvironmentFile($hash)
    {
        $envPath = $this->laravel->environmentFilePath();
        $envContent = $this->filesystem->get($envPath);

        $regex = '/UNDER_CONSTRUCTION_HASH=\S+/';

        if (preg_match($regex, $envContent)) {
            $hash = str_replace(['\\', '$'], ['', '\$'], $hash);
            $envContent = preg_replace($regex, $this->newLine($hash), $envContent);
        } else {
            $envContent .= "\n".$this->newLine($hash)."\n";
        }

        $this->filesystem->put($envPath, $envContent);
    }
38424
protected function clean_cohort_data(&$hash) {
        foreach ($hash as $key => $value) {
            switch ($key) {
                case 'contextid': $hash[$key] = clean_param($value, PARAM_INT); break;
                case 'name': $hash[$key] = core_text::substr(clean_param($value, PARAM_TEXT), 0, 254); break;
                case 'idnumber': $hash[$key] = core_text::substr(clean_param($value, PARAM_RAW), 0, 254); break;
                case 'description': $hash[$key] = clean_param($value, PARAM_RAW); break;
                case 'descriptionformat': $hash[$key] = clean_param($value, PARAM_INT); break;
                case 'visible':
                    $tempstr = trim(core_text::strtolower($value));
                    if ($tempstr === '') {
                        // Empty string is treated as "YES" (the default value for cohort visibility).
                        $hash[$key] = 1;
                    } else {
                        if ($tempstr === core_text::strtolower(get_string('no')) || $tempstr === 'n') {
                            // Special treatment for 'no' string that is not included in clean_param().
                            $value = 0;
                        }
                        $hash[$key] = clean_param($value, PARAM_BOOL) ? 1 : 0;
                    }
                    break;
                case 'theme':
                    $hash[$key] = core_text::substr(clean_param($value, PARAM_TEXT), 0, 50);
                    break;
            }
        }
    }
1325856
function del($hashOrObject)
    {
        $hash = $this->_attainHash($hashOrObject);
        if (!array_key_exists($hash, $this->_objs))
            return false;

        unset($this->_objs[$hash]);
        return true;
    }
212740
protected function deletePasswordRequestData($hash) 
    {
        $table = $this->getServiceLocator()->get('MelisLostPasswordTable');
        $data = $this->getPasswordRequestData($hash);
        
        if($data)
            $table->deleteByField('rh_hash', $hash);
    }