Code Duplication    Length = 7-7 lines in 2 locations

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

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

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

@@ 733-739 (lines=7) @@
730
	 * @param bool $raw
731
	 * @return string
732
	 */
733
	public function hash($type, $path, $raw = false) {
734
		$fh = $this->fopen($path, 'rb');
735
		$ctx = hash_init($type);
736
		hash_update_stream($ctx, $fh);
737
		fclose($fh);
738
		return hash_final($ctx, $raw);
739
	}
740
741
	/**
742
	 * return full path, including mount point