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?

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?

  • Ok thanks you! (I suspected the Lilliputians..) – Nicolas Cantu Nov 26 '18 at 15:37
  • haha they are alive and well in Bitcoin... :) – JBaczuk Nov 26 '18 at 15:37
  • Of course it's a little big part of Internet (Cohen) and a community story :) So they are well in Bitcoin :) – Nicolas Cantu Nov 27 '18 at 0:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.