Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnBase64.h@3:24c5f0f50bf1, 2012-07-31 (annotated)
- Committer:
- uci1
- Date:
- Tue Jul 31 04:59:16 2012 +0000
- Revision:
- 3:24c5f0f50bf1
- Parent:
- 1:e392595b4b76
- Child:
- 84:80b15993944e
Test bench version. Communications not completed. Debugging output present. But will read the local config file and save events that can be used for testing.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uci1 | 1:e392595b4b76 | 1 | #ifndef BASE64_H |
uci1 | 1:e392595b4b76 | 2 | #define BASE64_H |
uci1 | 1:e392595b4b76 | 3 | |
uci1 | 1:e392595b4b76 | 4 | #include <stdint.h> |
uci1 | 1:e392595b4b76 | 5 | |
uci1 | 1:e392595b4b76 | 6 | //Originaly from Rolf's iputil.h |
uci1 | 1:e392595b4b76 | 7 | |
uci1 | 1:e392595b4b76 | 8 | #define BASE64ENC_LEN(slen) ( ((((slen)-1)/3)+1)<<2 ) |
uci1 | 3:24c5f0f50bf1 | 9 | #define CHARPAD '=' |
uci1 | 1:e392595b4b76 | 10 | |
uci1 | 3:24c5f0f50bf1 | 11 | struct B64 { |
uci1 | 3:24c5f0f50bf1 | 12 | /* modp is faster |
uci1 | 3:24c5f0f50bf1 | 13 | static |
uci1 | 3:24c5f0f50bf1 | 14 | char* base64enc(const char* const input, const uint32_t length, char* output); |
uci1 | 3:24c5f0f50bf1 | 15 | */ |
uci1 | 1:e392595b4b76 | 16 | |
uci1 | 1:e392595b4b76 | 17 | static |
uci1 | 3:24c5f0f50bf1 | 18 | int modp_b64_encode(const char* str, const int len, char* dest); |
uci1 | 1:e392595b4b76 | 19 | |
uci1 | 3:24c5f0f50bf1 | 20 | static |
uci1 | 3:24c5f0f50bf1 | 21 | int modp_b64_decode(const char* src, int len, char* dest); |
uci1 | 1:e392595b4b76 | 22 | }; |
uci1 | 1:e392595b4b76 | 23 | |
uci1 | 1:e392595b4b76 | 24 | #endif |