suricata
util-base64.h File Reference
#include "suricata-common.h"
#include "threads.h"
#include "debug.h"
#include "decode.h"
#include "detect.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-engine-mpm.h"
#include "detect-engine-state.h"
#include "flow.h"
#include "flow-var.h"
#include "flow-util.h"
#include "util-debug.h"
#include "util-spm-bm.h"
Include dependency graph for util-base64.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASCII_BLOCK   3
 
#define B64_BLOCK   4
 

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 ASCII_BLOCK   3

Definition at line 48 of file util-base64.h.

Referenced by DecodeBase64(), and MimeDecAddEntity().

#define B64_BLOCK   4

Definition at line 49 of file util-base64.h.

Referenced by DecodeBase64(), and MimeDecAddEntity().

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 DetectBase64DecodeDoMatch(), MimeDecAddEntity(), and MimeDecParseFullMsg().

Here is the caller graph for this function: