Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move from SHA1 to SHA256
  • Loading branch information
derickr committed Feb 26, 2017
1 parent 1e5873c commit 90eba3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions html/download.php
Expand Up @@ -54,18 +54,18 @@
foreach( array_reverse( $files ) as $version => $tar ) {
echo "<strong>Xdebug {$version}";
$f = stat( "files/{$tar['source']}" );
$sha1 = sha1_file( "files/{$tar['source']}" );
$hash = hash_file( "sha256", "files/{$tar['source']}" );
$d = date( 'Y-m-d', $f['mtime'] );
echo "<div class='copy'>Release date: $d</div></strong>\n";
echo "<ul>";
echo "<li><a href='files/{$tar['source']}'>source</a> <span class='md5'>(SHA1: $sha1)</span></li>";
echo "<li><a href='files/{$tar['source']}'>source</a> <span class='md5'>(SHA256: $hash)</span></li>";
if (isset( $tar['dll'] )) {
echo "<li>Windows binaries:<br/>";
$links = array();
natsort( $tar['dll'] );
foreach( $tar['dll'] as $dls ) {
$s = stat( "files/$dls" );
$sha1 = sha1_file( "files/$dls" );
$hash = hash_file( 'sha256', "files/$dls" );
preg_match( '@^php_xdebug-2\.[0-9]\.[0-9].*?-([4567]\.[0-9])(\.[0-9])?(-(vc(?>6|9|11|14)))?(-nts)?(-(x86|x86_64))?\.dll$@', $dls, $m);
$name = $m[1];
$namea = '';
Expand All @@ -85,7 +85,7 @@
} else {
$namea .= " (32 bit)";
}
$links[] = "<a href='files/{$dls}'>PHP $name$namea</a> <span class='md5'>(SHA1: $sha1)</span>";
$links[] = "<a href='files/{$dls}'>PHP $name$namea</a> <span class='md5'>(SHA256: $hash)</span>";
}
echo join( '<br /> ', $links );
}
Expand Down

0 comments on commit 90eba3f

Please sign in to comment.