lib/private/Files/Storage/Wrapper/Encryption.php 1 location
|
@@ 821-827 (lines=7) @@
|
| 818 |
|
* @param bool $raw |
| 819 |
|
* @return string |
| 820 |
|
*/ |
| 821 |
|
public function hash($type, $path, $raw = false) { |
| 822 |
|
$fh = $this->fopen($path, 'rb'); |
| 823 |
|
$ctx = hash_init($type); |
| 824 |
|
hash_update_stream($ctx, $fh); |
| 825 |
|
fclose($fh); |
| 826 |
|
return hash_final($ctx, $raw); |
| 827 |
|
} |
| 828 |
|
|
| 829 |
|
/** |
| 830 |
|
* return full path, including mount point |
lib/private/Files/Storage/Common.php 1 location
|
@@ 245-251 (lines=7) @@
|
| 242 |
|
} |
| 243 |
|
} |
| 244 |
|
|
| 245 |
|
public function hash($type, $path, $raw = false) { |
| 246 |
|
$fh = $this->fopen($path, 'rb'); |
| 247 |
|
$ctx = hash_init($type); |
| 248 |
|
hash_update_stream($ctx, $fh); |
| 249 |
|
fclose($fh); |
| 250 |
|
return hash_final($ctx, $raw); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
public function search($query) { |
| 254 |
|
return $this->searchInDir($query); |