gsasl  1.10.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL). Development version.
  Fossies Dox: gsasl-1.10.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

base64.h File Reference
#include <stddef.h>
#include <stdbool.h>
Include dependency graph for base64.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  base64_decode_context
 

Macros

#define BASE64_LENGTH(inlen)   ((((inlen) + 2) / 3) * 4)
 
#define base64_decode(in, inlen, out, outlen)    base64_decode_ctx (NULL, in, inlen, out, outlen)
 
#define base64_decode_alloc(in, inlen, out, outlen)    base64_decode_alloc_ctx (NULL, in, inlen, out, outlen)
 

Functions

signed char isbase64 (char ch) _GL_ATTRIBUTE_CONST
 
void base64_encode (const char *restrict in, size_t inlen, char *restrict out, size_t outlen)
 
size_t base64_encode_alloc (const char *in, size_t inlen, char **out)
 
void base64_decode_ctx_init (struct base64_decode_context *ctx)
 
signed char base64_decode_ctx (struct base64_decode_context *ctx, const char *restrict in, size_t inlen, char *restrict out, size_t *outlen)
 
signed char base64_decode_alloc_ctx (struct base64_decode_context *ctx, const char *in, size_t inlen, char **out, size_t *outlen)
 

Macro Definition Documentation

◆ base64_decode

#define base64_decode (   in,
  inlen,
  out,
  outlen 
)     base64_decode_ctx (NULL, in, inlen, out, outlen)

Definition at line 58 of file base64.h.

◆ base64_decode_alloc

#define base64_decode_alloc (   in,
  inlen,
  out,
  outlen 
)     base64_decode_alloc_ctx (NULL, in, inlen, out, outlen)

Definition at line 61 of file base64.h.

◆ BASE64_LENGTH

#define BASE64_LENGTH (   inlen)    ((((inlen) + 2) / 3) * 4)

Definition at line 33 of file base64.h.

Function Documentation

◆ base64_decode_alloc_ctx()

signed char base64_decode_alloc_ctx ( struct base64_decode_context ctx,
const char *  in,
size_t  inlen,
char **  out,
size_t outlen 
)

Definition at line 579 of file base64.c.

References base64_decode_ctx(), and NULL.

◆ base64_decode_ctx()

signed char base64_decode_ctx ( struct base64_decode_context ctx,
const char *restrict  in,
size_t  inlen,
char *restrict  out,
size_t outlen 
)

◆ base64_decode_ctx_init()

void base64_decode_ctx_init ( struct base64_decode_context ctx)

Definition at line 336 of file base64.c.

References base64_decode_context::i.

◆ base64_encode()

void base64_encode ( const char *restrict  in,
size_t  inlen,
char *restrict  out,
size_t  outlen 
)

◆ base64_encode_alloc()

size_t base64_encode_alloc ( const char *  in,
size_t  inlen,
char **  out 
)

Definition at line 145 of file base64.c.

References base64_encode(), BASE64_LENGTH, and NULL.

Referenced by gsasl_base64_to().

◆ isbase64()

signed char isbase64 ( char  ch)

Definition at line 329 of file base64.c.

References b64, to_uchar(), and uchar_in_range.

Referenced by decode_4().