From How can I make this PHP merkle root script recursive?
function binFlipByteOrder($string) {
return implode('', array_reverse(str_split($string, 1)));
}
Why a flip?
From How can I make this PHP merkle root script recursive?
function binFlipByteOrder($string) {
return implode('', array_reverse(str_split($string, 1)));
}
Why a flip?
Hashes are big endian by standard, and most computers use little endian, so it's probably just for convenience. See Why does the Bitcoin protocol use the little-endian notation?