Lines Matching defs:str

2661 /* {{{ mp_read_raw(mp, str, len) */
2664 mp_read_raw(mp, str, len)
2669 mp_err mp_read_raw(mp_int *mp, char *str, int len)
2673 unsigned char *ustr = (unsigned char *)str;
2675 ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
2711 /* {{{ mp_toraw(mp, str) */
2713 mp_err mp_toraw(mp_int *mp, char *str)
2717 ARGCHK(mp != NULL && str != NULL, MP_BADARG);
2719 str[0] = (char)SIGN(mp);
2727 str[pos++] = (char)(d >> (jx * CHAR_BIT));
2737 /* {{{ mp_read_radix(mp, str, radix) */
2740 mp_read_radix(mp, str, radix)
2748 mp_err mp_read_radix(mp_int *mp, const char *str, int radix)
2754 ARGCHK(mp != NULL && str != NULL && radix >= 2 && radix <= MAX_RADIX,
2760 while(str[ix] &&
2761 (s_mp_tovalue(str[ix], radix) < 0) &&
2762 str[ix] != '-' &&
2763 str[ix] != '+') {
2767 if(str[ix] == '-') {
2770 } else if(str[ix] == '+') {
2775 while((val = s_mp_tovalue(str[ix], radix)) >= 0) {
2792 mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix)
2800 while ((cx = *str) != 0 &&
2804 ++str;
2809 ++str;
2812 ++str;
2815 if (str[0] == '0') {
2816 if ((str[1] | 0x20) == 'x') {
2818 str += 2;
2821 str++;
2824 res = mp_read_radix(a, str, radix);
2850 /* {{{ mp_toradix(mp, str, radix) */
2852 mp_err mp_toradix(mp_int *mp, char *str, int radix)
2856 ARGCHK(mp != NULL && str != NULL, MP_BADARG);
2860 str[0] = '0';
2861 str[1] = '\0';
2885 str[pos++] = ch;
2890 str[pos++] = '-';
2893 str[pos--] = '\0';
2898 char tmp = str[ix];
2900 str[ix] = str[pos];
2901 str[pos] = tmp;
4851 /* {{{ mp_read_unsigned_octets(mp, str, len) */
4852 /* mp_read_unsigned_octets(mp, str, len)
4858 mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len)
4864 ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
4871 d = (d << 8) | *str++;
4879 d = (d << 8) | *str++;
4929 /* {{{ mp_to_unsigned_octets(mp, str) */
4932 mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen)
4937 ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
4952 str[pos++] = x;
4956 str[pos++] = 0;
4961 /* {{{ mp_to_signed_octets(mp, str) */
4964 mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen)
4969 ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
4989 str[pos++] = 0;
4992 str[pos++] = x;
4996 str[pos++] = 0;
5001 /* {{{ mp_to_fixlen_octets(mp, str) */
5004 mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size length)
5009 ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
5016 *str++ = 0;
5029 str[pos++] = x;
5033 str[pos++] = 0;