aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/base64/base64.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-11-12 21:00:51 -0800
committerGarrett D'Amore <garrett@damore.org>2020-11-12 21:00:51 -0800
commit8d87c66b481c7d447270be7238ad3c10e7ebc5e7 (patch)
treef6218c6f812ff904b0f722cdebeedb7222ecf463 /src/supplemental/base64/base64.h
parent296d35fe695943a09dcc45469aa5aeadc619cf08 (diff)
downloadnng-8d87c66b481c7d447270be7238ad3c10e7ebc5e7.tar.gz
nng-8d87c66b481c7d447270be7238ad3c10e7ebc5e7.tar.bz2
nng-8d87c66b481c7d447270be7238ad3c10e7ebc5e7.zip
Base64 nits (code quality) fixed.
This also contains the start of some CMakefile refactoring and clean ups.
Diffstat (limited to 'src/supplemental/base64/base64.h')
-rw-r--r--src/supplemental/base64/base64.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/supplemental/base64/base64.h b/src/supplemental/base64/base64.h
index 68346435..97ca8968 100644
--- a/src/supplemental/base64/base64.h
+++ b/src/supplemental/base64/base64.h
@@ -1,6 +1,6 @@
//
// Copyright (c) 2014 Wirebird Labs LLC. All rights reserved.
-// Copyright 2017 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"),
@@ -31,10 +31,12 @@
// Base64 is defined in RFC 2045, section 6.8.
// This function encodes an arbitrary byte array into base64
-// null-terminated string.
-int nni_base64_encode(const uint8_t *, size_t, char *, size_t);
+// null-terminated string. It returns the number of characters
+// emitted.
+size_t nni_base64_encode(const uint8_t *, size_t, char *, size_t);
// This function decodes a base64 string into supplied buffer.
-int nni_base64_decode(const char *, size_t, uint8_t *, size_t);
+// It returns the number of bytes emitted.
+size_t nni_base64_decode(const char *, size_t, uint8_t *, size_t);
#endif