| 173 | |
| 174 | |
| 175 | word32 SetLength(word32 length, byte* output) |
| 176 | { |
| 177 | word32 i = 0; |
| 178 | |
| 179 | if (length < LONG_LENGTH) |
| 180 | output[i++] = length; |
| 181 | else { |
| 182 | output[i++] = BytePrecision(length) | 0x80; |
| 183 | |
| 184 | for (int j = BytePrecision(length); j; --j) { |
| 185 | output[i] = length >> (j - 1) * 8; |
| 186 | i++; |
| 187 | } |
| 188 | } |
| 189 | return i; |
| 190 | } |
| 191 | |
| 192 | |
| 193 | PublicKey::PublicKey(const byte* k, word32 s) : key_(0), sz_(0) |
no test coverage detected