diff options
author | Niels Möller <nisse@lysator.liu.se> | 2017-08-27 20:45:21 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2017-08-27 20:45:21 +0200 |
commit | f2da403135e2b2f641cf0f8219ad5b72083b7dfd (patch) | |
tree | e3df313301bd15c5009305e5b30501fb14e4758f /examples | |
parent | 0bf64256ecf10af974c1970d87ffad19cbce7b51 (diff) | |
download | nettle-f2da403135e2b2f641cf0f8219ad5b72083b7dfd.tar.gz |
Change type of base16- and base64-encoded data from uint8_t to char.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/base16dec.c | 2 | ||||
-rw-r--r-- | examples/base16enc.c | 2 | ||||
-rw-r--r-- | examples/base64dec.c | 2 | ||||
-rw-r--r-- | examples/base64enc.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/examples/base16dec.c b/examples/base16dec.c index 70714567..1185b3e1 100644 --- a/examples/base16dec.c +++ b/examples/base16dec.c @@ -58,7 +58,7 @@ int main(int argc UNUSED, char **argv UNUSED) { /* "buffer" will hold the bytes from disk: */ - uint8_t * buffer = xalloc (CHUNK_SIZE); + char * buffer = xalloc (CHUNK_SIZE); /* "result" will hold bytes before output: */ uint8_t * result = xalloc (DECODED_SIZE); diff --git a/examples/base16enc.c b/examples/base16enc.c index 02e4f280..6ac08e1d 100644 --- a/examples/base16enc.c +++ b/examples/base16enc.c @@ -70,7 +70,7 @@ main(int argc UNUSED, char **argv UNUSED) /* "buffer" will hold the bytes from disk: */ uint8_t buffer[CHUNK_SIZE]; /* "result" will hold bytes before output: */ - uint8_t result[ENCODED_SIZE + 1]; + char result[ENCODED_SIZE + 1]; unsigned nbytes; /* Number of bytes read from stdin */ int encoded_bytes; /* Total number of bytes encoded per iteration */ diff --git a/examples/base64dec.c b/examples/base64dec.c index 624de628..d05d924a 100644 --- a/examples/base64dec.c +++ b/examples/base64dec.c @@ -58,7 +58,7 @@ int main(int argc UNUSED, char **argv UNUSED) { /* "buffer" will hold the bytes from disk: */ - uint8_t * buffer = xalloc (CHUNK_SIZE); + char * buffer = xalloc (CHUNK_SIZE); /* "result" will hold bytes before output: */ uint8_t * result = xalloc (DECODED_SIZE); diff --git a/examples/base64enc.c b/examples/base64enc.c index f8ba829b..cc6010cc 100644 --- a/examples/base64enc.c +++ b/examples/base64enc.c @@ -72,7 +72,7 @@ main(int argc UNUSED, char **argv UNUSED) /* "buffer" will hold the bytes from disk: */ uint8_t buffer[CHUNK_SIZE]; /* "result" is the result vector: */ - uint8_t result[ENCODED_SIZE + BASE64_ENCODE_FINAL_LENGTH + 1]; + char result[ENCODED_SIZE + BASE64_ENCODE_FINAL_LENGTH + 1]; unsigned nbytes; /* Number of bytes read from stdin */ int encoded_bytes; /* total number of bytes encoded per iteration */ nbytes = fread(buffer,1,CHUNK_SIZE,stdin); |