Base64
Base64 Utilities. More...
Modules |
|
| Decode Stream | |
|
Base64 stream decoding.
|
|
| Encode Stream | |
|
Base64 stream encoding.
|
|
Functions |
|
| gos_result_t | gos_base64_encode (void *dst, uint32_t dlen, uint32_t *olen, const void *src, uint32_t slen) |
|
Encode a buffer into base64 format.
More...
|
|
| gos_result_t | gos_base64_decode (void *dst, uint32_t dlen, uint32_t *olen, const void *src, uint32_t slen) |
|
Decode a base64-formatted buffer.
More...
|
|
Detailed Description
Base64 Utilities.
Function Documentation
◆ gos_base64_decode()
| gos_result_t gos_base64_decode | ( | void * |
dst,
|
| uint32_t |
dlen,
|
||
| uint32_t * |
olen,
|
||
| const void * |
src,
|
||
| uint32_t |
slen
|
||
| ) |
Decode a base64-formatted buffer.
- Parameters
-
[out] dstdestination buffer [in] dlensize of the destination buffer [out] olennumber of bytes written [in] srcsource buffer [in] slenamount of data to be decoded
- Note
- Call this function with *dlen = 0 to obtain the required buffer size in *dlen
- Returns
- GOS_SUCCESS if successful, GOS_BUFFER_OVERFLOW if the destination buffer is not large enough, or GOS_BAD_ARG if the input data is not correct. *dlen is always updated to reflect the amount of data that has (or would have) been written.
◆ gos_base64_encode()
| gos_result_t gos_base64_encode | ( | void * |
dst,
|
| uint32_t |
dlen,
|
||
| uint32_t * |
olen,
|
||
| const void * |
src,
|
||
| uint32_t |
slen
|
||
| ) |
Encode a buffer into base64 format.
- Parameters
-
[out] dstdestination buffer [in] dlensize of the buffer [out] olennumber of bytes written [in] srcsource buffer [in] slenamount of data to be encoded
- Note
- Call this function with *dlen = 0 to obtain the required buffer size in *dlen
- Returns
- GOS_SUCCESS if successful, or GOS_BUFFER_OVERFLOW if the destination buffer is not large enough. *dlen is always updated to reflect the amount of data that has (or would have) been written.