Allow some parameters to be NULL if the length is 0.
This change permits users of the ChaCha20/Poly1305 algorithms
(and the AEAD construction thereof) to pass NULL pointers for
data that they do not need, and avoids the need to provide a valid
buffer for data that is not used.
diff --git a/include/mbedtls/poly1305.h b/include/mbedtls/poly1305.h
index 1aa55ae..ea9364a 100644
--- a/include/mbedtls/poly1305.h
+++ b/include/mbedtls/poly1305.h
@@ -85,6 +85,7 @@
* \param ctx The Poly1305 context.
* \param ilen The input length (in bytes). Any value is accepted.
* \param input Buffer containing the input data to Process.
+ * This pointer can be NULL if ilen == 0.
*
* \return MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA is returned if ctx
* or input are NULL.