Php hash return type: Not string(64)? -


i performing hash on various data. on data, after result of hash, can var_dump of hash, , print:

> string(64) "<hash goes here>" 

however, 1 of data hashing, result prints hash, no "string(64)" preceding it, , no quotes around it.

> <hash goes here> 

what cause of this? possibly due size of data?

code example, of should see:

$string= "hello"; $hash = hash( 'sha512', $string, true ); var_dump($hash); 

this should print:

string(64) "<hash value of 'hello'>" 

in case, replace "hello" contents of long php file. reason var_dump not printing value in quotes "string(64)" in front of it.

you using third parameter set true in hash function, output in binary format, not suitable viewed in standard output. previous hash may contain control chars suppresses part of next output. binary data should viewed in hex form (third parameter set false) or saved file , browsed hex editor.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -