Lines Matching refs:source
40 str_totext(const char *source, isc_buffer_t *target);
53 base32_totext(isc_region_t *source, int wordlength, const char *wordbreak, in base32_totext() argument
63 while (source->length > 0) { in base32_totext()
64 buf[0] = base[((source->base[0] >> 3) & 0x1f)]; /* 5 + */ in base32_totext()
65 if (source->length == 1) { in base32_totext()
66 buf[1] = base[(source->base[0] << 2) & 0x1c]; in base32_totext()
72 buf[1] = base[((source->base[0] << 2) & 0x1c) | /* 3 = 8 */ in base32_totext()
73 ((source->base[1] >> 6) & 0x03)]; /* 2 + */ in base32_totext()
74 buf[2] = base[((source->base[1] >> 1) & 0x1f)]; /* 5 + */ in base32_totext()
75 if (source->length == 2) { in base32_totext()
76 buf[3] = base[(source->base[1] << 4) & 0x10]; in base32_totext()
81 buf[3] = base[((source->base[1] << 4) & 0x10) | /* 1 = 8 */ in base32_totext()
82 ((source->base[2] >> 4) & 0x0f)]; /* 4 + */ in base32_totext()
83 if (source->length == 3) { in base32_totext()
84 buf[4] = base[(source->base[2] << 1) & 0x1e]; in base32_totext()
89 buf[4] = base[((source->base[2] << 1) & 0x1e) | /* 4 = 8 */ in base32_totext()
90 ((source->base[3] >> 7) & 0x01)]; /* 1 + */ in base32_totext()
91 buf[5] = base[((source->base[3] >> 2) & 0x1f)]; /* 5 + */ in base32_totext()
92 if (source->length == 4) { in base32_totext()
93 buf[6] = base[(source->base[3] << 3) & 0x18]; in base32_totext()
98 buf[6] = base[((source->base[3] << 3) & 0x18) | /* 2 = 8 */ in base32_totext()
99 ((source->base[4] >> 5) & 0x07)]; /* 3 + */ in base32_totext()
100 buf[7] = base[source->base[4] & 0x1f]; /* 5 = 8 */ in base32_totext()
102 isc_region_consume(source, 5); in base32_totext()
105 if (source->length != 0 && wordlength >= 0 && in base32_totext()
112 if (source->length > 0) { in base32_totext()
113 isc_region_consume(source, source->length); in base32_totext()
119 isc_base32_totext(isc_region_t *source, int wordlength, const char *wordbreak, in isc_base32_totext() argument
121 return (base32_totext(source, wordlength, wordbreak, target, base32, in isc_base32_totext()
126 isc_base32hex_totext(isc_region_t *source, int wordlength, in isc_base32hex_totext() argument
128 return (base32_totext(source, wordlength, wordbreak, target, base32hex, in isc_base32hex_totext()
133 isc_base32hexnp_totext(isc_region_t *source, int wordlength, in isc_base32hexnp_totext() argument
135 return (base32_totext(source, wordlength, wordbreak, target, base32hex, in isc_base32hexnp_totext()
388 base32_decoderegion(isc_region_t *source, const char base[], bool pad, in base32_decoderegion() argument
393 while (source->length != 0) { in base32_decoderegion()
394 int c = *source->base; in base32_decoderegion()
396 isc_region_consume(source, 1); in base32_decoderegion()
403 isc_base32_decoderegion(isc_region_t *source, isc_buffer_t *target) { in isc_base32_decoderegion() argument
404 return (base32_decoderegion(source, base32, true, target)); in isc_base32_decoderegion()
408 isc_base32hex_decoderegion(isc_region_t *source, isc_buffer_t *target) { in isc_base32hex_decoderegion() argument
409 return (base32_decoderegion(source, base32hex, true, target)); in isc_base32hex_decoderegion()
413 isc_base32hexnp_decoderegion(isc_region_t *source, isc_buffer_t *target) { in isc_base32hexnp_decoderegion() argument
414 return (base32_decoderegion(source, base32hex, false, target)); in isc_base32hexnp_decoderegion()
418 str_totext(const char *source, isc_buffer_t *target) { in str_totext() argument
423 l = strlen(source); in str_totext()
429 memmove(region.base, source, l); in str_totext()