unsigned int  bytes;
int  bytes;
mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen){  int  ix, pos = 0;  unsigned int  bytes;  ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);  bytes = mp_unsigned_octet_size(mp);  ARGCHK(bytes <= maxlen, MP_BADARG);  /* Iterate over each digit... */  for(ix = USED(mp) - 1; ix >= 0; ix--) {    mp_digit  d = DIGIT(mp, ix);    int       jx;    /* Unpack digit bytes, high order first */    for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {      unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));      if (!pos && !x)	/* suppress leading zeros */	continue;      str[pos++] = x;    }  }  return pos;} /* end mp_to_unsigned_octets() */