Changeset View
Changeset View
Standalone View
Standalone View
src/upload/ArcanistFileDataRef.php
Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | if ($data === false) { | ||||
$start, | $start, | ||||
$path)); | $path)); | ||||
} | } | ||||
return $data; | return $data; | ||||
} | } | ||||
private function newFileHash($path) { | private function newFileHash($path) { | ||||
$hash = hash_file('sha256', $path, $raw_output = false); | |||||
if ($hash === false) { | |||||
return null; | return null; | ||||
} | } | ||||
return $hash; | |||||
} | |||||
private function newDataHash($data) { | private function newDataHash($data) { | ||||
$hash = hash('sha256', $data, $raw_output = false); | |||||
if ($hash === false) { | |||||
return null; | return null; | ||||
} | } | ||||
return $hash; | |||||
} | |||||
} | } |