suricata
util-base64.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2012 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author David Abarbanel <david.abarbanel@baesystems.com>
22  *
23  */
24 
25 #ifndef __UTIL_BASE64_H_
26 #define __UTIL_BASE64_H_
27 
28 #include "suricata-common.h"
29 #include "threads.h"
30 #include "debug.h"
31 #include "decode.h"
32 
33 #include "detect.h"
34 #include "detect-parse.h"
35 
36 #include "detect-engine.h"
37 #include "detect-engine-mpm.h"
38 #include "detect-engine-state.h"
39 
40 #include "flow.h"
41 #include "flow-var.h"
42 #include "flow-util.h"
43 
44 #include "util-debug.h"
45 #include "util-spm-bm.h"
46 
47 /* Constants */
48 #define ASCII_BLOCK 3
49 #define B64_BLOCK 4
50 
51 /* Function prototypes */
52 uint32_t DecodeBase64(uint8_t *dest, const uint8_t *src, uint32_t len,
53  int strict);
54 
55 #endif
uint16_t src
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.
Definition: util-base64.c:91
Data structures and function prototypes for keeping state for the detection engine.
uint8_t len