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
|
@@ 753-759 (lines=7) @@
|
| 750 |
|
* @param bool $raw |
| 751 |
|
* @return string |
| 752 |
|
*/ |
| 753 |
|
public function hash($type, $path, $raw = false) { |
| 754 |
|
$fh = $this->fopen($path, 'rb'); |
| 755 |
|
$ctx = hash_init($type); |
| 756 |
|
hash_update_stream($ctx, $fh); |
| 757 |
|
fclose($fh); |
| 758 |
|
return hash_final($ctx, $raw); |
| 759 |
|
} |
| 760 |
|
|
| 761 |
|
/** |
| 762 |
|
* return full path, including mount point |