2

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?

Glorfindel
  • 529
  • 3
  • 7
  • 19

1 Answers1

3

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?

JBaczuk
  • 7,278
  • 1
  • 11
  • 32