| 33 | static_assert(sizeof(unsigned) == sizeof(int), "unsigned and int must have the same size"); |
| 34 | |
| 35 | unsigned bytes_be_to_uint(const unsigned char *bytes) |
| 36 | { |
| 37 | return ((bytes[0] & 0xffu) << 24u) | ((bytes[1] & 0xffu) << 16u) | ((bytes[2] & 0xffu) << 8u) | (bytes[3] & 0xffu); |
| 38 | } |
| 39 | |
| 40 | void uint_to_bytes_be(unsigned char *bytes, unsigned value) |
| 41 | { |
no outgoing calls