diff options
author | Niels Möller <nisse@lysator.liu.se> | 2002-10-22 22:43:57 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2002-10-22 22:43:57 +0200 |
commit | 70dfb6479321c8e3a6361bbbbc36403246a55688 (patch) | |
tree | 3c59aeee5fc6201167885bd03a89bc29c2e369ab /base64.h | |
parent | ce50686f85936e3703357af7ea1b2e0c55cca6fc (diff) | |
download | nettle-70dfb6479321c8e3a6361bbbbc36403246a55688.tar.gz |
(base64_decode_single): New function.
(base64_decode_update): Use base64_decode_single.
Rev: src/nettle/base64-decode.c:1.2
Rev: src/nettle/base64.h:1.10
Diffstat (limited to 'base64.h')
-rw-r--r-- | base64.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -55,7 +55,7 @@ struct base64_encode_ctx void base64_encode_init(struct base64_encode_ctx *ctx); -/* Encodes a single byte. Returns amoutn of output (always 1 or 2). */ +/* Encodes a single byte. Returns amount of output (always 1 or 2). */ unsigned base64_encode_single(struct base64_encode_ctx *ctx, uint8_t *dst, @@ -108,6 +108,13 @@ struct base64_decode_ctx void base64_decode_init(struct base64_decode_ctx *ctx); +/* Decodes a single byte. Returns amount of output (always 0 or 1). + * FIXME: What to return on errors? */ +unsigned +base64_decode_single(struct base64_decode_ctx *ctx, + uint8_t *dst, + uint8_t src); + /* Returns the number of output characters. DST should point to an * area of size at least BASE64_DECODE_LENGTH(length). */ unsigned |