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

◆ BASE64_TABLE_MAX

#define BASE64_TABLE_MAX   122

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

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: