/external/dropbear/libtommath/ |
bn_mp_clamp.c | 20 * This is used to ensure that leading zero digits are 21 * trimed and the leading "used" digit will be non-zero 28 /* decrease used while the most significant digit is 31 while (a->used > 0 && a->dp[a->used - 1] == 0) { 32 --(a->used); 35 /* reset the sign flag if used == 0 */ 36 if (a->used == 0) {
|
bn_mp_cmp_mag.c | 25 if (a->used > b->used) { 29 if (a->used < b->used) { 34 tmpa = a->dp + (a->used - 1); 37 tmpb = b->dp + (a->used - 1); 40 for (n = 0; n < a->used; ++n, --tmpa, --tmpb) {
|
bn_mp_div_2.c | 24 if (b->alloc < a->used) { 25 if ((res = mp_grow (b, a->used)) != MP_OKAY) { 30 oldused = b->used; 31 b->used = a->used; 36 tmpa = a->dp + b->used - 1; 39 tmpb = b->dp + b->used - 1; 43 for (x = b->used - 1; x >= 0; x--) { 55 tmpb = b->dp + b->used; 56 for (x = b->used; x < oldused; x++) [all...] |
bn_mp_reduce_is_2k_l.c | 18 /* determines if reduce_2k_l can be used */ 23 if (a->used == 0) { 25 } else if (a->used == 1) { 27 } else if (a->used > 1) { 29 for (iy = ix = 0; ix < a->used; ix++) { 34 return (iy >= (a->used/2)) ? MP_YES : MP_NO;
|
bn_mp_mul.c | 26 if (MIN (a->used, b->used) >= TOOM_MUL_CUTOFF) { 32 if (MIN (a->used, b->used) >= KARATSUBA_MUL_CUTOFF) { 39 * The fast multiplier can be used if the output will 43 int digs = a->used + b->used + 1; 47 MIN(a->used, b->used) <= 59 c->sign = (c->used > 0) ? neg : MP_ZPOS [all...] |
bn_mp_mul_2.c | 24 if (b->alloc < a->used + 1) { 25 if ((res = mp_grow (b, a->used + 1)) != MP_OKAY) { 30 oldused = b->used; 31 b->used = a->used; 44 for (x = 0; x < a->used; x++) { 64 ++(b->used); 70 tmpb = b->dp + b->used; 71 for (x = b->used; x < oldused; x++) {
|
bn_mp_copy.c | 30 if (b->alloc < a->used) { 31 if ((res = mp_grow (b, a->used)) != MP_OKAY) { 49 for (n = 0; n < a->used; n++) { 54 for (; n < b->used; n++) { 59 /* copy used count and sign */ 60 b->used = a->used;
|
bn_mp_dr_is_modulus.c | 24 if (a->used < 2) { 31 for (ix = 1; ix < a->used; ix++) {
|
bn_mp_rshd.c | 28 /* if b > used then simply zero it and return */ 29 if (a->used <= b) { 55 for (x = 0; x < (a->used - b); x++) { 60 for (; x < a->used; x++) { 66 a->used -= b;
|
bn_mp_shrink.c | 22 if (a->alloc != a->used && a->used > 0) { 23 if ((tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * a->used)) == NULL) { 27 a->alloc = a->used;
|
bn_mp_count_bits.c | 26 if (a->used == 0) { 31 r = (a->used - 1) * DIGIT_BIT; 34 q = a->dp[a->used - 1];
|
bn_s_mp_mul_high_digs.c | 32 if (((a->used + b->used + 1) < MP_WARRAY) 33 && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) { 38 if ((res = mp_init_size (&t, a->used + b->used + 1)) != MP_OKAY) { 41 t.used = a->used + b->used + 1; 43 pa = a->used; [all...] |
bn_mp_sub_d.c | 26 if (c->alloc < a->used + 1) { 27 if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) { 47 oldused = c->used; 52 if ((a->used == 1 && a->dp[0] <= b) || a->used == 0) { 53 if (a->used == 1) { 62 c->used = 1; 66 c->used = a->used; 74 for (ix = 1; ix < a->used; ix++) [all...] |
bn_mp_lshd.c | 29 if (a->alloc < a->used + b) { 30 if ((res = mp_grow (a, a->used + b)) != MP_OKAY) { 38 /* increment the used by the shift amount then copy upwards */ 39 a->used += b; 42 top = a->dp + a->used - 1; 45 bottom = a->dp + a->used - 1 - b; 51 for (x = a->used - 1; x >= b; x--) {
|
bn_mp_mul_d.c | 27 if (c->alloc < a->used + 1) { 28 if ((res = mp_grow (c, a->used + 1)) != MP_OKAY) { 33 /* get the original destinations used count */ 34 olduse = c->used; 49 for (ix = 0; ix < a->used; ix++) { 69 /* set used count */ 70 c->used = a->used + 1;
|
bn_fast_mp_montgomery_reduce.c | 31 /* get old used count */ 32 olduse = x->used; 35 if (x->alloc < n->used + 1) { 36 if ((res = mp_grow (x, n->used + 1)) != MP_OKAY) { 54 /* copy the digits of a into W[0..a->used-1] */ 55 for (ix = 0; ix < x->used; ix++) { 59 /* zero the high words of W[a->used..m->used*2] */ 60 for (; ix < n->used * 2 + 1; ix++) { 68 for (ix = 0; ix < n->used; ix++) [all...] |
bn_mp_reduce_is_2k.c | 18 /* determines if mp_reduce_2k can be used */ 24 if (a->used == 0) { 26 } else if (a->used == 1) { 28 } else if (a->used > 1) {
|
bn_mp_sqr.c | 26 if (a->used >= TOOM_SQR_CUTOFF) { 32 if (a->used >= KARATSUBA_SQR_CUTOFF) { 39 if ((a->used * 2 + 1) < MP_WARRAY && 40 a->used <
|
bn_mp_add_d.c | 26 if (c->alloc < a->used + 1) { 27 if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) { 33 if (a->sign == MP_NEG && (a->used > 1 || a->dp[0] >= b)) { 49 /* old number of used digits in c */ 50 oldused = c->used; 71 for (ix = 1; ix < a->used; ix++) { 81 c->used = a->used + 1; 84 c->used = 1; 87 if (a->used == 1) [all...] |
bn_s_mp_add.c | 28 if (a->used > b->used) { 29 min = b->used; 30 max = a->used; 33 min = a->used; 34 max = b->used; 45 /* get old used digit count and set new one */ 46 olduse = c->used; 47 c->used = max + 1; 97 for (i = c->used; i < olduse; i++) [all...] |
bn_fast_s_mp_mul_high_digs.c | 22 * This is used in the Barrett reduction since for one of the multiplications 34 pa = a->used + b->used; 42 pa = a->used + b->used; 49 ty = MIN(b->used-1, ix); 57 while (tx++ < a->used && ty-- >= 0) { ... } 59 iy = MIN(a->used-tx, ty+1); 74 olduse = c->used; 75 c->used = pa [all...] |
bn_mp_get_int.c | 24 if (a->used == 0) { 29 i = MIN(a->used,(int)((sizeof(unsigned long)*CHAR_BIT+DIGIT_BIT-1)/DIGIT_BIT))-1;
|
bn_mp_and.c | 25 if (a->used > b->used) { 29 px = b->used; 35 px = a->used; 44 for (; ix < t.used; ix++) {
|
/frameworks/base/include/utils/ |
Buffer.h | 31 int used; member in class:android::Buffer 37 if (len + used >= bufsiz) { 38 bufsiz = (len + used) * 3/2 + 2; 41 memcpy(blah, buf, used); 64 used = 0; 70 return used; 77 buf[used] = c; 78 used++; 79 buf[used] = '\0'; 87 memcpy(buf + used, s, len) [all...] |
/external/dropbear/ |
circbuffer.c | 41 cbuf->used = 0; 57 return cbuf->used; 63 return cbuf->size - cbuf->used; 69 dropbear_assert(((2*cbuf->size)+cbuf->writepos-cbuf->readpos)%cbuf->size == cbuf->used%cbuf->size); 70 dropbear_assert(((2*cbuf->size)+cbuf->readpos-cbuf->writepos)%cbuf->size == (cbuf->size-cbuf->used)%cbuf->size); 72 if (cbuf->used == 0) { 86 dropbear_assert(cbuf->used <= cbuf->size); 87 dropbear_assert(((2*cbuf->size)+cbuf->writepos-cbuf->readpos)%cbuf->size == cbuf->used%cbuf->size); 88 dropbear_assert(((2*cbuf->size)+cbuf->readpos-cbuf->writepos)%cbuf->size == (cbuf->size-cbuf->used)%cbuf->size); 90 if (cbuf->used == cbuf->size) [all...] |