sha3_256_ctx and sha3_256_init, are defined as preprocessor
aliases, for backwards compatibility.
+ * The dst_length argument to base16_decode_update and
+ base64_decode_update is now both an input and output
+ argument. On input it must now hold the size of the
+ destination buffer, and decoding fails if that is not
+ sufficient. Previously, dst_length was an output only, and
+ it was required that the destination buffer was large enough
+ for any input of the given src_length.
+
Interface deletions:
* Deleted the old struct aes_ctx, and all functions operating
@deftypefun {void} base64_decode_update (struct base64_decode_ctx *@var{ctx}, size_t *@var{dst_length}, uint8_t *@var{dst}, size_t @var{src_length}, const uint8_t *@var{src})
After @var{ctx} is initialized, this function may be called to decode
-@var{src_length} bytes from @var{src}. @var{dst} should point to an area
-of size at least BASE64_DECODE_LENGTH(@var{src_length}). The amount of data
-generated is returned in *@var{dst_length}. Returns 1 on success
-and 0 on error.
+@var{src_length} bytes from @var{src}. The buffer pointed to by
+@var{dst} must be of size *@var{dst_length}, and the amount of data
+actually generated is returned in *@var{dst_length}. Fails if
+@var{dst_length} is too small; using a buffer of size
+BASE64_DECODE_LENGTH(@var{src_length}) is always sufficient. Returns 1 on
+success and 0 on error.
@end deftypefun
@deftypefun {int} base64_decode_final (struct base64_decode_ctx *@var{ctx})
@deftypefun {int} base16_decode_update (struct base16_decode_ctx *@var{ctx}, size_t *@var{dst_length}, uint8_t *@var{dst}, size_t @var{src_length}, const uint8_t *@var{src})
After @var{ctx} is initialized, this function may be called to decode
-@var{src_length} bytes from @var{src}. @var{dst} should point to an area
-of size at least BASE16_DECODE_LENGTH(@var{src_length}). The amount of data
-generated is returned in *@var{dst_length}. Returns 1 on success
-and 0 on error.
+@var{src_length} bytes from @var{src}. The buffer pointed to by
+@var{dst} must be of size *@var{dst_length}, and the amount of data
+actually generated is returned in *@var{dst_length}. Fails if
+@var{dst_length} is too small; using a buffer of size
+BASE16_DECODE_LENGTH(@var{src_length}) is always sufficient. Returns 1 on
+success and 0 on error.
@end deftypefun
@deftypefun {int} base16_decode_final (struct base16_decode_ctx *@var{ctx})