| 249 | } |
| 250 | |
| 251 | unsigned char Int::GetByte(int n) { |
| 252 | unsigned char buffer[32]; |
| 253 | size_t count, size = this->GetSize(); |
| 254 | memset(buffer, 0, 32); |
| 255 | mpz_export(buffer + 32 - size, &count, 0, 1, 0, 0, num); |
| 256 | return buffer[n]; |
| 257 | } |
| 258 | |
| 259 | char* Int::GetBase2() { |
| 260 | return mpz_get_str(NULL,2,num); |