summaryrefslogtreecommitdiff
path: root/base64.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-02-07 09:11:20 +0100
committerNiels Möller <nisse@lysator.liu.se>2014-02-07 09:11:20 +0100
commit07cb0b62a5fab216ed647f5a87e0f17ab3c9a615 (patch)
treec271d5419c3eac4b54ade8cabb0cc560c4a7d744 /base64.h
parentd055d0e5f86cecc221e7c53444dd4724a91f6d7e (diff)
downloadnettle-07cb0b62a5fab216ed647f5a87e0f17ab3c9a615.tar.gz
Base64 and base16 decoding: Use *dst_length as output only.
Diffstat (limited to 'base64.h')
-rw-r--r--base64.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/base64.h b/base64.h
index 94ed52ae..af4454c5 100644
--- a/base64.h
+++ b/base64.h
@@ -128,13 +128,8 @@ base64_decode_single(struct base64_decode_ctx *ctx,
uint8_t src);
/* Returns 1 on success, 0 on error. DST should point to an area of
- * size at least BASE64_DECODE_LENGTH(length), and for sanity
- * checking, *DST_LENGTH should be initialized to the size of that
- * area before the call. *DST_LENGTH is updated to the amount of
- * decoded output. */
-
-/* Currently results in an assertion failure if *DST_LENGTH is
- * too small. FIXME: Return some error instead? */
+ * size at least BASE64_DECODE_LENGTH(length). The amount of data
+ * generated is returned in *DST_LENGTH. */
int
base64_decode_update(struct base64_decode_ctx *ctx,
size_t *dst_length,