Code Duplication    Length = 7-7 lines in 2 locations

lib/private/Files/Storage/Wrapper/Encryption.php 1 location

@@ 869-875 (lines=7) @@
866
	 * @param bool $raw
867
	 * @return string
868
	 */
869
	public function hash($type, $path, $raw = false) {
870
		$fh = $this->fopen($path, 'rb');
871
		$ctx = hash_init($type);
872
		hash_update_stream($ctx, $fh);
873
		fclose($fh);
874
		return hash_final($ctx, $raw);
875
	}
876
877
	/**
878
	 * return full path, including mount point

lib/private/Files/Storage/Common.php 1 location

@@ 241-247 (lines=7) @@
238
		}
239
	}
240
241
	public function hash($type, $path, $raw = false) {
242
		$fh = $this->fopen($path, 'rb');
243
		$ctx = hash_init($type);
244
		hash_update_stream($ctx, $fh);
245
		fclose($fh);
246
		return hash_final($ctx, $raw);
247
	}
248
249
	public function search($query) {
250
		return $this->searchInDir($query);