#include <base64.h>
Public Types | |
| enum class | Error { kNone , kBadPadding , kBadChar } |
Static Public Member Functions | |
| static size_t | Encode (const void *src, size_t length, void *dst) |
| static size_t | EncodedSize (size_t srcDataLength) |
| static Error | Decode (const void *src, size_t srcLength, void *dst, size_t *dstLength) |
|
strong |
| Enumerator | |
|---|---|
| kNone | |
| kBadPadding | |
| kBadChar | |
|
static |
Base64 decodes src into dst.
This can be called once with 'dst' nullptr to get the required size, then again with an allocated 'dst' pointer to do the actual decoding.
| dst | nullptr or a pointer to a buffer large enough to receive the result |
| dstLength | assigned the length dst is required to be. Must not be nullptr. |
Definition at line 28 of file base64.cc.
References DecodePad, end, FML_DCHECK, i, kBadChar, kBadPadding, kDecodeData, and kNone.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
|
static |
Base64 encodes src into dst.
| dst | a pointer to a buffer large enough to receive the result. |
Definition at line 118 of file base64.cc.
References d, EncodedSize(), EncodePad, end, FML_DCHECK, kDefaultEncode, and length.
Referenced by flutter::testing::TEST(), and flutter::testing::TEST().
|
inlinestatic |
Returns the length of the buffer that needs to be allocated to encode srcDataLength bytes.
Definition at line 33 of file base64.h.
Referenced by Encode(), flutter::testing::TEST(), and flutter::testing::TEST().