| 124 | } |
| 125 | |
| 126 | static void shiftArrayRight(unsigned char* to, const unsigned char* from, unsigned int arrayLength, unsigned int bitsToShift) |
| 127 | { |
| 128 | for (unsigned int T=0; T < arrayLength; ++T) |
| 129 | { |
| 130 | unsigned int F = (T+bitsToShift/8); |
| 131 | if (F < arrayLength) |
| 132 | to[T] = uint8_t(from[F] >> (bitsToShift % 8)); |
| 133 | else |
| 134 | to[T] = 0; |
| 135 | if (F + 1 < arrayLength) |
| 136 | to[T] |= uint8_t(from[(F + 1)] << (8 - bitsToShift % 8)); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | static void shiftArrayLeft(unsigned char* to, const unsigned char* from, unsigned int arrayLength, unsigned int bitsToShift) |
| 141 | { |
no outgoing calls
no test coverage detected