Implemented public Base64 interface

Base64 is required for vCard avatars. It will also be useful for
an authentication mechanism with future xmpp_connect_raw() interface.
This commit is contained in:
Dmitry Podgorny
2016-04-30 18:04:56 +00:00
parent 7f57e3987a
commit 2ffb278aa4
6 changed files with 356 additions and 294 deletions

View File

@@ -27,18 +27,4 @@ char *sasl_scram_sha1(xmpp_ctx_t *ctx, const char *challenge,
const char *first_bare, const char *jid,
const char *password);
/** Base64 encoding routines. Implemented according to RFC 3548 */
int base64_encoded_len(xmpp_ctx_t *ctx, const unsigned len);
char *base64_encode(xmpp_ctx_t *ctx,
const unsigned char * const buffer, const unsigned len);
int base64_decoded_len(xmpp_ctx_t *ctx,
const char * const buffer, const unsigned len);
unsigned char *base64_decode(xmpp_ctx_t *ctx,
const char * const buffer, const unsigned len);
#endif /* _LIBXMPP_SASL_H__ */