1/*********************************************************************\ 2 3MODULE NAME: b64.c 4 5AUTHOR: Bob Trower 08/04/01 6 7PROJECT: Crypt Data Packaging 8 --- 232 unchanged lines hidden (view full) --- 241 unsigned i; 242 uint8_t wordout[4]; 243 uint8_t wordin[3]; 244 char *out = vp; 245 char *outp; 246 int blocksout; 247 int wordlen; 248 |
249 wordlen = 0; 250 for (blocksout = 0, inp = in, outp = out; (size_t)(inp - in) < insize && (size_t)(outp - out) < outsize;) { 251 for (wordlen = 0, i = 0; i < sizeof(wordin); i++) { 252 wordin[i] = (uint8_t) *inp++; 253 if ((size_t)(inp - in) <= insize) { 254 wordlen++; 255 } else { 256 wordin[i] = 0x0; --- 45 unchanged lines hidden (view full) --- 302 unsigned wordlen; 303 unsigned i; 304 uint8_t wordout[3]; 305 uint8_t wordin[4]; 306 uint8_t v; 307 char *out = vp; 308 char *outp; 309 |
310 for (inp = in, outp = out ; (size_t)(inp - in) < insize && (size_t)(outp - out) < outsize ; ) { 311 for (wordlen = 0, i = 0 ; i < sizeof(wordin) && (size_t)(inp - in) < insize ; i++) { 312 /* get a single character */ 313 for (v = 0; (size_t)(inp - in) <= insize && v == 0 ; ) { 314 if (*inp == '\r' && *(inp + 1) == '\n') { 315 inp += 2; 316 } else { 317 v = (uint8_t) *inp++; --- 32 unchanged lines hidden --- |