Answer the question
In order to leave comments, you need to log in
Why does the js hash function counterpart in php give different hashes?
Good time friends, I brought you some horror from js that I wanted to translate into php . The
question is, why are the hashes different? cite the code, first js function then its analogue in php
function on JAVASCRIPT
pastebin.com/RL21GShg
function on the PHP
pastebin.com/mZsYhHap
On js hash: c4cf282458ea415fc58cd9a2a98d9b284a1a494e99fce5e96bc117b924361e00
in PHP hash: 0000000000000000000000000000000000000000000000000000000000000000
Why is it so? I don't understand what went wrong!
Answer the question
In order to leave comments, you need to log in
Confuses this moment:
JS:
if (s[0] = v, s[16] = s[1] = s[2] = s[3] = s[4] = s[5] = s[6] = s[7] = s[8] = s[9] = s[10] = s[11] = s[12] = s[13] = s[14] = s[15] = 0) { ... }
if ($s[0] = $v and $s[16] = $s[1] = $s[2] = $s[3] = $s[4] = $s[5] = $s[6] = $s[7] = $s[8] = $s[9] = $s[10] = $s[11] = $s[12] = $s[13] = $s[14] = $s[15] = 0) { ... }
if ($s[0] = $v and $s[16] = $s[1] = $s[2] = $s[3] = $s[4] = $s[5] = $s[6] = $s[7] = $s[8] = $s[9] = $s[10] = $s[11] = $s[12] = $s[13] = $s[14] = $s[15] = 0) {
$s[0] = $v;
if ($s[16] = $s[1] = $s[2] = $s[3] = $s[4] = $s[5] = $s[6] = $s[7] = $s[8] = $s[9] = $s[10] = $s[11] = $s[12] = $s[13] = $s[14] = $s[15] = 0) {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question