mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Hash: simplify sha512 code
This commit is contained in:
parent
28866e826b
commit
a5316b71f5
@ -1787,10 +1787,7 @@ class Hash
|
|||||||
|
|
||||||
// Produce the final hash value (big-endian)
|
// Produce the final hash value (big-endian)
|
||||||
// (\phpseclib3\Crypt\Hash::hash() trims the output for hashes but not for HMACs. as such, we trim the output here)
|
// (\phpseclib3\Crypt\Hash::hash() trims the output for hashes but not for HMACs. as such, we trim the output here)
|
||||||
$temp = pack('J', $hash[0]) . pack('J', $hash[1]) . pack('J', $hash[2]) . pack('J', $hash[3]) .
|
return pack('J*', ...$hash);
|
||||||
pack('J', $hash[4]) . pack('J', $hash[5]) . pack('J', $hash[6]) . pack('J', $hash[7]);
|
|
||||||
|
|
||||||
return $temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user