aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-06 23:58:38 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-06 23:58:38 +0000
commit564e9fb1b34538cb325a56dd1a0b0866f363edc4 (patch)
treec3c50625f7a2212d282b2456e114292f048e7119 /include/asterisk
parent120520cb80c936fffcf174126035733e83097038 (diff)
Add some documentation on the arguments to the base64 encode/decode functions.
(inspired by issue #9215) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58149 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/utils.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 8981824eb..5c68a2773 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -161,7 +161,26 @@ void ast_md5_hash(char *output, char *input);
void ast_sha1_hash(char *output, char *input);
int ast_base64encode_full(char *dst, const unsigned char *src, int srclen, int max, int linebreaks);
+
+/*!
+ * \brief Encode data in base64
+ * \param dst the destination buffer
+ * \param src the source data to be encoded
+ * \param srclen the number of bytes present in the source buffer
+ * \param max the maximum number of bytes to write into the destination
+ * buffer, *including* the terminating NULL character.
+ */
int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max);
+
+/*!
+ * \brief Decode data from base64
+ * \param dst the destination buffer
+ * \param src the source buffer
+ * \param max The maximum number of bytes to write into the destination
+ * buffer. Note that this function will not ensure that the
+ * destination buffer is NULL terminated. So, in general,
+ * this parameter should be sizeof(dst) - 1.
+ */
int ast_base64decode(unsigned char *dst, const char *src, int max);
/*! \brief Turn text string to URI-encoded %XX version