Lines Matching refs:length
56 PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) /* {{{ */ in php_base64_encode() argument
62 result = zend_string_safe_alloc(((length + 2) / 3), 4 * sizeof(char), 0, 0); in php_base64_encode()
65 while (length > 2) { /* keep going until we have less than 24 bits */ in php_base64_encode()
72 length -= 3; /* we just handle 3 octets of data */ in php_base64_encode()
76 if (length != 0) { in php_base64_encode()
78 if (length > 1) { in php_base64_encode()
130 PHPAPI zend_string *php_base64_decode(const unsigned char *str, size_t length) /* {{{ */ in php_base64_decode() argument
132 return php_base64_decode_ex(str, length, 0); in php_base64_decode()
136 PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict)… in php_base64_decode_ex() argument
142 result = zend_string_alloc(length, 0); in php_base64_decode_ex()
145 while (length-- > 0) { in php_base64_decode_ex()