Get all available hash from data
@param   string $data Data from get hash
@return  JBDump
427038
public static function hash($data)
    {
        $result = array();
        foreach (hash_algos() as $algoritm) {
            $result[$algoritm] = hash($algoritm, $data, false);
        }
        return self::i()->dump($result, '! hash !');
    }
733586
protected function getData($data)
    {
        $method = "load" . strtoupper($this->mode);

        libxml_use_internal_errors(true);
        $this->dom->$method($data);
        $this->errors = libxml_get_errors();
        libxml_clear_errors();

        return $data;
    }
424482
public function compareHash($data, $hash)
    {
        $salt = $this->extractSalt($hash);

        $newHash = $this->createHash($data, $salt);

        return ($newHash == $hash);
    }
194485
public function decrypt($data) {
        if (is_array($data)) return array_map([$this, __FUNCTION__], $data);
        $raw = base64_decode($data);
        openssl_public_decrypt($raw, $result, $this->key);
        return $result;
    }
650223
public function repackSeedData($data)
    {
        if (!is_array($data)) {
            $data = $data->toArray();
        }
        $dataArray = array();
        if (!empty($data)) {
            foreach ($data as $row) {
                $rowArray = array();
                foreach ($row as $columnName => $columnValue) {
                    $rowArray[$columnName] = $columnValue;
                }
                $dataArray[] = $rowArray;
            }
        }
        return $dataArray;
    }
897551
public function bulk($data)
    {

        if (is_callback_function($data)) {

            $bulk = new Bulk($this);

            $data($bulk);

            $params = $bulk->body();

        } else {

            $params = [];

            foreach ($data as $key => $value) {

                $params["body"][] = [

                    'index' => [
                        '_index' => $this->getIndex(),
                        '_type' => $this->getType(),
                        '_id' => $key
                    ]

                ];

                $params["body"][] = $value;

            }

        }

        return (object)$this->connection->bulk($params);
    }
304740
public static function getHMACMD5Hash($password, $data) {
    $dataString = implode('', $data);

    return self::getHMACMD5HashString($password, $dataString);
  }
978757
public function decrypt(string $data)
    {
        $this->throwExceptionIfKeyEmpty();

        if ($data === '') {
            return '';
        }

        list($encrypted_data, $iv) = \explode('::', \base64_decode($data, true), 2);

        return \openssl_decrypt($encrypted_data, $this->method, $this->key, 0, $iv);
    }
1040263
public function getDataWrapper($data = null)
    {
        // if $data is set reconstruct the data wrapper
        if (!$this->dataWrapper || $data) {
            $this->dataWrapper = new DataWrapper\ArrayWrapper($data);
        }

        return $this->dataWrapper;
    }
1013963
public function get($data = [])
	{
		// Process data given.
		$processPayload = $this->process(__FUNCTION__, $data);

		if( ! $processPayload->isStatus(Payload::STATUS_VALID))
		{
			return $processPayload;
		}

		return $this->aggregate[self::getEntityType()]->get(
			$processPayload->getData()['filter'],
			$processPayload->getData()['sort'],
			$processPayload->getData()['field'],
			$processPayload->getData()['embed']
		);
	}
465690
public function get($data) {
        $is_one = !static::isSomeArr($data);;
        if ($is_one) {
            $data = [$data];
        }
        $data = $this->getWithMulti($data);
        return $is_one ? reset($data) : $data;
    }
715305
public static function hash($data, bool $secure = false): string
    {
        return hash(self::getAlgo($secure), (string) $data);
    }
409277
public static function replicate($data)
    {
        $copy = clone $data;

        foreach ($copy as $key => $value) {
            if (is_object($value)) {
                $copy->{$key} = static::replicate($value);
            }
        }

        return $copy;
    }
693743
public static function getKeyDataFromString(string $data): string
    {
        $versionTag = Binary::safeSubstr($data, 0, Halite::VERSION_TAG_LEN);
        $keyData = Binary::safeSubstr(
            $data,
            Halite::VERSION_TAG_LEN,
            -\SODIUM_CRYPTO_GENERICHASH_BYTES_MAX
        );
        $checksum = Binary::safeSubstr(
            $data,
            -\SODIUM_CRYPTO_GENERICHASH_BYTES_MAX,
            \SODIUM_CRYPTO_GENERICHASH_BYTES_MAX
        );
        $calc = \sodium_crypto_generichash(
            $versionTag . $keyData,
            '',
            \SODIUM_CRYPTO_GENERICHASH_BYTES_MAX
        );
        if (!\hash_equals($calc, $checksum)) {
            // @codeCoverageIgnoreStart
            throw new InvalidKey(
                'Checksum validation fail'
            );
            // @codeCoverageIgnoreEnd
        }
        \sodium_memzero($data);
        \sodium_memzero($versionTag);
        \sodium_memzero($calc);
        \sodium_memzero($checksum);
        return $keyData;
    }
1359591
public function decrypt($data)
    {
        $json = base64_decode($data);
        $data = json_decode($json);

        // check mac
        if ($this->hashCheck($data->iv, $data->value, $data->mac)) {

            $iv = base64_decode($data->iv);

            $data = openssl_decrypt($data->value, $this->method, $this->key, 0, $iv);

            return unserialize($data);

        }

        throw new Exception('Mac not match.');
    }
900245
public function decrypt(string $data)
    {
        if (!$this->password)
        {
            return JSON::decode($data);
        }

        $decrypt = $this->security()
            ->decrypt($data);

        return JSON::decode($decrypt);
    }
1153520
public function update($data)
    {
        // Error if hash is already calculated.
        if ($this->hash) {
            throw new \LogicException('You may not add more data to a '
                . 'complete tree hash.');
        }

        // Buffer incoming data.
        $this->buffer .= $data;

        // When there is more than a MB of data, create a checksum.
        while (strlen($this->buffer) >= self::MB) {
            $data = substr($this->buffer, 0, self::MB);
            $this->buffer = substr($this->buffer, self::MB) ?: '';
            $this->checksums[] = hash($this->algorithm, $data, true);
        }

        return $this;
    }