suricata
util-base64.c File Reference
#include "util-base64.h"
Include dependency graph for util-base64.c:

Go to the source code of this file.

Macros

#define BASE64_TABLE_MAX   122
 

Functions

uint32_t DecodeBase64 (uint8_t *dest, const uint8_t *src, uint32_t len, int strict)
 Decodes a base64-encoded string buffer into an ascii-encoded byte buffer. More...
 

Detailed Description

Macro Definition Documentation

#define BASE64_TABLE_MAX   122

Definition at line 28 of file util-base64.c.

Function Documentation

uint32_t DecodeBase64 ( uint8_t *  dest,
const uint8_t *  src,
uint32_t  len,
int  strict 
)

Decodes a base64-encoded string buffer into an ascii-encoded byte buffer.

Parameters
destThe destination byte buffer
srcThe source string
lenThe length of the source string
strictIf set file on invalid byte, otherwise return what has been decoded.
Returns
Number of bytes decoded, or 0 if no data is decoded or it fails

Definition at line 91 of file util-base64.c.

References ASCII_BLOCK, B64_BLOCK, padding, and SCLogDebug.

Referenced by DatasetAddSerialized(), DatasetGetTypeFromString(), DetectBase64DecodeDoMatch(), MimeDecAddEntity(), and MimeDecParseFullMsg().

Here is the caller graph for this function: