Return the SHA1 hash of the exported content.

@return string
354835
public function get_sha1() {

        $identifier = 'submission:'.$this->submission->id.'@'.$this->submission->timemodified;

        if ($this->assessments) {
            $ids = array_keys($this->assessments);
            sort($ids);
            $identifier .= '/assessments:'.implode(',', $ids);
        }

        if ($this->multifiles) {
            $identifier .= '/files:'.$this->get_sha1_file();
        }

        return sha1($identifier);
    }
463426
public function get_sha1() {
        // in the case that we're exporting a subclass of 'file' and we have a singlefile,
        // then we're not exporting any metadata, just the file by itself by mimetype.
        if ($this->exporter->get('format') instanceof portfolio_format_file && $this->singlefile) {
            return $this->get_sha1_file();
        }
        // otherwise we're exporting some sort of multipart content so use the data
        $str = '';
        foreach ($this->records as $record) {
            foreach ($record as $data) {
                if (is_array($data) || is_object($data)) {
                    $keys = array_keys($data);
                    $testkey = array_pop($keys);
                    if (is_array($data[$testkey]) || is_object($data[$testkey])) {
                        foreach ($data as $d) {
                            $str .= implode(',', (array)$d);
                        }
                    } else {
                        $str .= implode(',', (array)$data);
                    }
                } else {
                    $str .= $data;
                }
            }
        }
        return sha1($str . ',' . $this->exporter->get('formatclass'));
    }
1130376
public function getHashCode() {
    	return md5(
    		  $this->_name
    		. $this->_description
    		. $this->_worksheet->getHashCode()
    		. $this->_coordinates
    		. $this->_offsetX
    		. $this->_offsetY
    		. $this->_width
    		. $this->_height
    		. $this->_rotation
    		. $this->_shadow->getHashCode()
    		. __CLASS__
    	);
    }
892641
private function getHash()
    {
        return md5(implode('&', [
            'appkey=' . $this->parameters->getAuth('appkey'),
            'secret=' . $this->parameters->getAuth('secret'),
            'email=' . $this->parameters->getAuth('email'),
            'password=' . $this->parameters->getAuth('password'),
        ]));
    }
1140948
public function getHash ()
    {
        if ($this->contextHashData['version'] !== $this->version) {
            $this->contextHashData['version'] = $this->version;
            $this->contextHashData['hash'] = md5(json_encode($this->data));
        }
        
        return $this->contextHashData['hash'];
    }
1176517
public function getHash()
    {
        $hash = [];
        foreach ($this as $embed) {
            $hash[] = $embed->getHash();
        }
        sort($hash);
        return md5(serialize($hash));
    }
1008673
public function getHash()
	{
		$h = hash_init($this->_hashAlgo);
		foreach($this->_keys as &$v)
			hash_update($h, $v);
		$r = hash_final($h, true);
		unset($h);
		return $r;
	}
1274841
public function getSeriesHash()
  {
    $hash = [];

    if ($this->getMeta('title') !== null) {
      $hash[] = $this->getMeta('title');
    }

    if ($this->getMeta('group') !== null) {
      $hash[] = $this->getMeta('group');
    }

    if ($this->getMeta('quality') !== null) {
      $hash[] = $this->getMeta('quality');
    }

    if ($this->getMeta('type')) {
      $hash[] = $this->getMeta('type');

      if ($this->getMeta('special') !== null) {
        $hash[] = $this->getMeta('special') . '.' . md5($this->size . $this->recordUpdated);
      }

      if ($this->getMeta('season') !== null) {
        $hash[] = $this->getMeta('season');
      }
    }

    return implode('-', $hash);
  }
886465
public function getHashCode()
    {
        if ($this->isSupervisor) {
            return $this->getSharedComponent()->getHashCode();
        }
        return md5(
            $this->argb .
            __CLASS__
        );
    }
1183083
public function getSha512Hash()
    {
        $signatureKey = $this->getSignatureKey();
        $request = $this->httpRequest->request;

        $hashData = '^' . implode('^', [
            $request->get('x_trans_id'),
            $request->get('x_test_request'),
            $request->get('x_response_code'),
            $request->get('x_auth_code'),
            $request->get('x_cvv2_resp_code'),
            $request->get('x_cavv_response'),
            $request->get('x_avs_code'),
            $request->get('x_method'),
            $request->get('x_account_number'),
            $request->get('x_amount'),
            $request->get('x_company'),
            $request->get('x_first_name'),
            $request->get('x_last_name'),
            $request->get('x_address'),
            $request->get('x_city'),
            $request->get('x_state'),
            $request->get('x_zip'),
            $request->get('x_country'),
            $request->get('x_phone'),
            $request->get('x_fax'),
            $request->get('x_email'),
            $request->get('x_ship_to_company'),
            $request->get('x_ship_to_first_name'),
            $request->get('x_ship_to_last_name'),
            $request->get('x_ship_to_address'),
            $request->get('x_ship_to_city'),
            $request->get('x_ship_to_state'),
            $request->get('x_ship_to_zip'),
            $request->get('x_ship_to_country'),
            $request->get('x_invoice_num'),
        ]) . '^';
        $hash = hash_hmac('sha512', $hashData, hex2bin($signatureKey));

        return strtoupper($hash);
    }
1262396
def content_sha1(context):
    
    try:
        content = context.current_parameters['content']
    except AttributeError:
        content = context
    return hashlib.sha1(encodeutils.to_utf8(content)).hexdigest()
511395
public String getAvatarHash() {
        byte[] bytes = getAvatar();
        if (bytes == null) {
            return null;
        }

        MessageDigest digest;
        try {
            digest = MessageDigest.getInstance("SHA-1");
        }
        catch (NoSuchAlgorithmException e) {
            LOGGER.log(Level.SEVERE, "Failed to get message digest", e);
            return null;
        }

        digest.update(bytes);
        return StringUtils.encodeHex(digest.digest());
    }
378330
protected function getContentTypesHash()
    {
        $contentTypeHash = [];
        foreach ($this->contentTypeService->loadContentTypeGroups() as $contentTypeGroup) {
            foreach ($this->contentTypeService->loadContentTypes($contentTypeGroup) as $contentType) {
                $contentTypeHash[$contentType->getName()] = $contentType->identifier;
            }
        }
        ksort($contentTypeHash);

        return $contentTypeHash;
    }
302740
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->name,
            $this->mainModName,
            $this->loadedModNames,
            $this->loadedOptionalModNames,
        ]);
    }
896334
private function generateHash()
    {
        $ctx = hash_init('md5');

        // We don't need to read the file contents if the source has a path
        if ($this->source->path()) {
            hash_update_file($ctx, $this->source->path());
        } else {
            hash_update($ctx, $this->source->contents());
        }

        return hash_final($ctx);
    }
740951
public function getSha256()
    {
        if (!$this->sha256) {
            $this->sha256 = $this->media->getHash('sha256');
        }

        return $this->sha256;
    }
1158762
public function getHash()
    {
        return md5(
            implode('', $this->scripts)
            . implode('', $this->files)
            . $this->mode
            . $this->warningLevel
            . $this->getFormattingOptions()->getPrettyPrintEnabled()
            . $this->getFormattingOptions()->getPrintInputDelimiterEnabled()
        );
    }