Code Duplication    Length = 7-7 lines in 2 locations

lib/private/files/storage/common.php 1 location

@@ 229-235 (lines=7) @@
226
		}
227
	}
228
229
	public function hash($type, $path, $raw = false) {
230
		$fh = $this->fopen($path, 'rb');
231
		$ctx = hash_init($type);
232
		hash_update_stream($ctx, $fh);
233
		fclose($fh);
234
		return hash_final($ctx, $raw);
235
	}
236
237
	public function search($query) {
238
		return $this->searchInDir($query);

lib/private/files/storage/wrapper/encryption.php 1 location

@@ 722-728 (lines=7) @@
719
	 * @param bool $raw
720
	 * @return string
721
	 */
722
	public function hash($type, $path, $raw = false) {
723
		$fh = $this->fopen($path, 'rb');
724
		$ctx = hash_init($type);
725
		hash_update_stream($ctx, $fh);
726
		fclose($fh);
727
		return hash_final($ctx, $raw);
728
	}
729
730
	/**
731
	 * return full path, including mount point