sanitized pcp_unpadfour(), just return the number of zero padding, leave the input pointer untouched; fixed header

This commit is contained in:
TLINDEN
2014-02-10 08:46:52 +01:00
parent 91f94a532e
commit ab03a10340
2 changed files with 6 additions and 8 deletions

View File

@@ -30,10 +30,10 @@
/* convert a binary stream to one which gets accepted by zmq_z85_encode */
/* we pad it with zeroes and put the number of zerores in front of it */
unsigned char *pcp_unpadfour(unsigned char *src, size_t srclen, size_t *dstlen);
unsigned char *pcp_padfour(unsigned char *src, size_t srclen, size_t *dstlen);
/* the reverse of the above */
unsigned char *pcp_unpadfour(unsigned char *src, size_t srclen, size_t *dstlen);
size_t pcp_unpadfour(unsigned char *src, size_t srclen);
/* wrapper around zmq Z85 encoding function */
unsigned char *pcp_z85_decode(char *z85block, size_t *dstlen);