Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions b64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ void main()
}
*/

int b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen)
void b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen)
{
// Work out if we've got enough space to encode the input
// Every 6 bits of input becomes a byte of output
if (aOutputLen < (aInputLen*8)/6)
{
// FIXME Should we return an error here, or just the length
return (aInputLen*8)/6;
// return (aInputLen*8)/6;
}

// If we get here we've got enough space to do the encoding
Expand Down
2 changes: 1 addition & 1 deletion b64.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef b64_h
#define b64_h

int b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen);
void b64_encode(const unsigned char* aInput, int aInputLen, unsigned char* aOutput, int aOutputLen);

#endif