suricata
|
Go to the source code of this file.
Macros | |
#define | BASE64_TABLE_MAX 122 |
#define | TEST_RFC2045(src, fin_str, dest_size, exp_decoded, exp_consumed, ecode) |
#define | TEST_RFC4648(src, fin_str, dest_size, exp_decoded, exp_consumed, ecode) |
Functions | |
bool | IsBase64Alphabet (uint8_t encoded_byte) |
Checks if the given char in a byte array is Base64 alphabet. More... | |
Base64Ecode | DecodeBase64 (uint8_t *dest, uint32_t dest_size, const uint8_t *src, uint32_t len, uint32_t *consumed_bytes, uint32_t *decoded_bytes, Base64Mode mode) |
Decodes a base64-encoded string buffer into an ascii-encoded byte buffer. More... | |
void | Base64RegisterTests (void) |
Definition in file util-base64.c.
#define BASE64_TABLE_MAX 122 |
Definition at line 30 of file util-base64.c.
#define TEST_RFC2045 | ( | src, | |
fin_str, | |||
dest_size, | |||
exp_decoded, | |||
exp_consumed, | |||
ecode | |||
) |
Definition at line 211 of file util-base64.c.
#define TEST_RFC4648 | ( | src, | |
fin_str, | |||
dest_size, | |||
exp_decoded, | |||
exp_consumed, | |||
ecode | |||
) |
Definition at line 223 of file util-base64.c.
void Base64RegisterTests | ( | void | ) |
Definition at line 400 of file util-base64.c.
References UtRegisterTest().
Base64Ecode DecodeBase64 | ( | uint8_t * | dest, |
uint32_t | dest_size, | ||
const uint8_t * | src, | ||
uint32_t | len, | ||
uint32_t * | consumed_bytes, | ||
uint32_t * | decoded_bytes, | ||
Base64Mode | mode | ||
) |
Decodes a base64-encoded string buffer into an ascii-encoded byte buffer.
dest | The destination byte buffer |
dest_size | The destination byte buffer size |
src | The source string |
len | The length of the source string |
consumed_bytes | The bytes that were actually processed/consumed |
decoded_bytes | The bytes that were decoded |
mode | The mode in which decoding should happen |
Definition at line 109 of file util-base64.c.
References B64_BLOCK, BASE64_ECODE_OK, len, and padding.
Referenced by DetectBase64DecodeDoMatch().
bool IsBase64Alphabet | ( | uint8_t | encoded_byte | ) |
Checks if the given char in a byte array is Base64 alphabet.
Char | that needs to be checked |
Definition at line 73 of file util-base64.c.