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

◆ ASCII_BLOCK

#define ASCII_BLOCK   3

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

◆ B64_BLOCK

#define B64_BLOCK   4

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

Function Documentation

◆ DecodeBase64()

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 B64_BLOCK, len, padding, and src.

Referenced by DatasetAddSerialized(), DatasetRemoveSerialized(), and DetectBase64DecodeDoMatch().

Here is the caller graph for this function: