Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
Go to the source code of this file.
Functions | |
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... | |
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().