DecodeBase64

Function to decode a BASE64 string into any data output array.

The BASE64 string is measured by the (non-zero) size given or by the terminator.

If output is nullptr the length will be calculated but the string itself will not be generated.

Syntax

//
//   Strong typing definition
//
int64_t         DecodeBase64(
                        unsigned char           * output,
                        const char              * input,
                        int64_t                 size
                    );

static  inline  int64_t DecodeBase64(
                                unsigned char           * output,
                                char                    * input,
                                int64_t                 size
                            )
{
    return  DecodeBase64(
                    output,
                    (const char*) input,
                    size
                );
}

static  inline  int64_t DecodeBase64(
                                unsigned char           * output,
                                const char              * input
                            )
{
    return  DecodeBase64(
                    output,
                    input,
                    0                                   //    size
                );
}


//
//   Weak typing definition
//
int64_t __declspec(dllexport) __stdcall DecodeBase64(
                                                unsigned char           * output,
                                                const char              * input,
                                                int64_t                 size
                                            );

static  inline  int64_t DecodeBase64(
                                unsigned char           * output,
                                char                    * input,
                                int64_t                 size
                            )
{
    return  DecodeBase64(
                    output,
                    (const char*) input,
                    size
                );
}

static  inline  int64_t DecodeBase64(
                                unsigned char           * output,
                                const char              * input
                            )
{
    return  DecodeBase64(
                    output,
                    input,
                    0                                   //    size
                );
}
    

Property output

Size: 64 bit / 8 byte (reference)
???.

Property input

Size: 64 bit / 8 byte (reference)
???.

Property size

Size: 64 bit / 8 byte (value)
The given size.