Skip to content

Commit

Permalink
bulk snake_case replace Base64 to base64
Browse files Browse the repository at this point in the history
  • Loading branch information
dragorn committed Aug 10, 2019
1 parent b1cbbfb commit 6e980b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions base64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@

#include "base64.h"

const char Base64::b64_values[] =
const char base64::b64_values[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

void Base64::decodeblock(unsigned char *in, unsigned char *out) {
void base64::decodeblock(unsigned char *in, unsigned char *out) {
out[0] = in[0] << 2 | in[1] >> 4;
out[1] = in[1] << 4 | in[2] >> 2;
out[2] = in[2] << 6 | in[3] >> 0;
out[3] = 0;
}

std::string Base64::decode(std::string in_str) {
std::string base64::decode(std::string in_str) {
std::string out;
unsigned char obuf[4], ibuf[4];
int phase, c;
Expand Down
2 changes: 1 addition & 1 deletion base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Needed to handle b64 encoded post data for the webserver
*/

class Base64 {
class base64 {
public:
/* Decode a string; return raw data if it was valid */
static std::string decode(std::string in_str);
Expand Down
2 changes: 1 addition & 1 deletion gpsweb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int GPSWeb::Httpd_PostIterator(void *coninfo_cls, enum MHD_ValueKind kind,
if (concls->url == "/gps/web/update.cmd") {
#if 0
if (strcmp(key, "msgpack") == 0 && size > 0) {
std::string decode = Base64::decode(std::string(data));
std::string decode = base64::decode(std::string(data));

// Get the dictionary
MsgpackAdapter::MsgpackStrMap params;
Expand Down

0 comments on commit 6e980b9

Please sign in to comment.