Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_util.h>
Go to the source code of this file.
Functions | |
static void | de_bruijn_seq (int prenecklace_len_t, int lyndon_prefix_len_p, int order, int maxlen, int size, int *prenecklace_a, char *sequence, const char *charset) |
static char * | de_bruijn (const char *charset, int order, int maxlen) |
RZ_API RZ_OWN char * | rz_debruijn_pattern (int size, int start, const char *charset) |
Generate a cyclic pattern following the Debruijn pattern. More... | |
RZ_API int | rz_debruijn_offset (int start, const char *charset, ut64 value, bool is_big_endian) |
Finds the offset of a given value in a debrujn sequence. More... | |
Variables | |
static const char * | debruijn_charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890" |
Definition at line 47 of file debruijn.c.
References calloc(), de_bruijn_seq(), free(), maxlen, and NULL.
Referenced by rz_debruijn_pattern().
|
static |
Finds the offset of a given value in a debrujn sequence.
start | Starting offset in the Debruijn pattern |
charset | Set of characters to use to generate the sequence |
value | Value to search in the sequence |
is_big_endian | Endianess of value |
value
is found or -1 if not found Definition at line 112 of file debruijn.c.
References free(), int, is_big_endian(), RZ_ARRAY_SIZE, rz_debruijn_pattern(), rz_write_be64(), rz_write_le64(), start, and value.
Referenced by rz_main_rz_gg(), and rz_write_debruijn_find_handler().
Generate a cyclic pattern following the Debruijn pattern.
Generate a cyclic pattern of desired size, and charset, return with starting offset of start.
For example, AAABAACAAD is a sequence of size 10, start 0, charset = debruijn_charset.
size | Size of the string to return |
start | Starting offset in the Debruijn pattern |
charset | Set of characters to use to generate the string |
size
allocated on the heap Definition at line 80 of file debruijn.c.
References de_bruijn(), debruijn_charset, free(), len, NULL, RZ_NEWS0, rz_return_val_if_fail, and start.
Referenced by __printPattern(), initialize_stack(), rz_debruijn_offset(), rz_egg_pattern(), and rz_write_debruijn_handler().
|
static |
Definition at line 12 of file debruijn.c.
Referenced by rz_debruijn_pattern().