1

i already found this question: How to convert an int to a little endian byte array?

Is there a way to convert the integer into a byte[8] instead of a byte[4] array?

Community
  • 1
  • 1
user4013391
  • 107
  • 2
  • 13

1 Answers1

0

Just cast the int to long before converting to Little Endian.

"Filling" with zeroes would make any negative number a different positive number.

C.Evenhuis
  • 25,310
  • 2
  • 59
  • 70