WordPress at a glance
function is not described

getid3_lib::hash_data() public WP 1.0

Returns checksum for a file from starting position to absolute end position.

{} It's a method of the class: getid3_lib{}

No Hooks.

Return

String|false. Nothing.

Usage

$result = getid3_lib::hash_data( $file, $offset, $end, $algorithm );
$file(string) (required)
-
$offset(int) (required)
-
$end(int) (required)
-
$algorithm(string) (required)
-

Code of getid3_lib::hash_data() WP 5.7.2

<?php
public static function hash_data($file, $offset, $end, $algorithm) {
	if (!self::intValueSupported($end)) {
		return false;
	}
	if (!in_array($algorithm, array('md5', 'sha1'))) {
		throw new getid3_exception('Invalid algorithm ('.$algorithm.') in self::hash_data()');
	}

	$size = $end - $offset;

	$fp = fopen($file, 'rb');
	fseek($fp, $offset);
	$ctx = hash_init($algorithm);
	while ($size > 0) {
		$buffer = fread($fp, min($size, getID3::FREAD_BUFFER_SIZE));
		hash_update($ctx, $buffer);
		$size -= getID3::FREAD_BUFFER_SIZE;
	}
	$hash = hash_final($ctx);
	fclose($fp);

	return $hash;
}