Where are base64_encode/decode functions defined?

samsam
Posts: 50
Joined: Sun Jun 04, 2017 5:26 pm

Where are base64_encode/decode functions defined?

Postby samsam » Tue Jul 18, 2017 1:20 am

There are couple base64.h files that declare base64_encode/decode functions, but I dont see the implementation?

Also the way how is macro BASE64_H defined could be an issue if some module require the base64_encode/decode and other require _base64_encode/decode versions of those utils in the same application:

esp-idf\components\wpa_supplicant\include\crypto\base64.h:
#ifndef BASE64_H
#define BASE64_H
unsigned char * base64_encode(const unsigned char *src, size_t len, size_t *out_len);
unsigned char * base64_decode(const unsigned char *src, size_t len, size_t *out_len);
#endif /* BASE64_H */

esp-idf\components\wpa_supplicant\include\wpa2\utils\base64.h
#ifndef BASE64_H
#define BASE64_H
unsigned char * _base64_encode(const unsigned char *src, size_t len, size_t *out_len);
unsigned char * _base64_decode(const unsigned char *src, size_t len, size_t *out_len);
#endif /* BASE64_H */

Thanks

mh-dev
Posts: 25
Joined: Mon Nov 30, 2015 5:14 am

Re: Where are base64_encode/decode functions defined?

Postby mh-dev » Tue Jul 18, 2017 1:30 am



samsam
Posts: 50
Joined: Sun Jun 04, 2017 5:26 pm

Re: Where are base64_encode/decode functions defined?

Postby samsam » Tue Jul 18, 2017 3:39 am

Thanks, this with the rom was quite helpfull as there is no any clue neither in my local esp-idf installation nor in the online docs.

BTW, not that I have real problem on my own right now with this, but just out of curiosity - dont you see any problem how is BASE64_H defined in those 2 same name, but not same base64.h files for situation like the one I mention in the first post?

Who is online

Users browsing this forum: No registered users and 99 guests