150 std::string rc(16,0);
152 const uint8_t exclude[13] =
154 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
155 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60
158 const uint32_t value = complm ? ~
val() :
val();
160 for (
int ii = 0; ii < 4; ii++)
162 uint8_t
byte = (value >> (24 - (8 * ii)));
164 const uint8_t quotient =
byte / 4 +
'0';
165 const uint8_t remainder =
byte % 4;
167 uint32_t ch[4] = { uint32_t(quotient+remainder), quotient, quotient, quotient };
173 for (
int kk = 0; kk < 13; kk++)
175 for (
int jj = 0; jj < 4; jj += 2)
177 if (ch[jj] != exclude[kk] && ch[jj+1] != exclude[kk])
190 for (
int jj = 0; jj < 4; jj++)
191 rc[4*jj+ii] = ch[jj];
194 const char lastChar = rc[15];
195 for (
int i=15;
i>0;
i--)