| 239 | } |
| 240 | |
| 241 | unsigned int GetCompact() const |
| 242 | { |
| 243 | unsigned int nSize = BN_bn2mpi(bn, NULL); |
| 244 | std::vector<unsigned char> vch(nSize); |
| 245 | nSize -= 4; |
| 246 | BN_bn2mpi(bn, &vch[0]); |
| 247 | unsigned int nCompact = nSize << 24; |
| 248 | if (nSize >= 1) nCompact |= (vch[4] << 16); |
| 249 | if (nSize >= 2) nCompact |= (vch[5] << 8); |
| 250 | if (nSize >= 3) nCompact |= (vch[6] << 0); |
| 251 | return nCompact; |
| 252 | } |
| 253 | |
| 254 | void SetHex(const std::string& str) |
| 255 | { |
nothing calls this directly
no outgoing calls
no test coverage detected