On 19 Jan 2017, at 3:22 PM, Dirk-Willem van Gulik <di...@webweaving.org> wrote:
> Any reason we do not have such in APR-2 (as a compagnion to > apr_pbase64_encode) ? > > Dw. > > > > APR_DECLARE(char *) apr_pbase64_encode_binary(apr_pool_t *p, const unsigned > char *string, int len) > { > char *encoded; > > encoded = (char *) apr_palloc(p, 1 + apr_base64_encode_len(len)); > len = apr_base64_encode_binary(encoded, string, len); > encoded[len] = '\0'; /* make binary sequence into string */ > > return encoded; > } Ideally we should have a base64 variant here, and deprecate the existing functions: http://apr.apache.org/docs/apr/1.5/group___a_p_r___util___escaping.html Regards, Graham —
smime.p7s
Description: S/MIME cryptographic signature