2025-10-11 01:35:43 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
< meta name = "generator" content = "Doxygen 1.14.0" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > libaaruformat: src/checksum/spamsum.c File Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< script type = "text/javascript" src = "clipboard.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< script type = "text/javascript" src = "cookie.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr id = "projectrow" >
< td id = "projectalign" >
< div id = "projectname" > libaaruformat< span id = "projectnumber" >   1.0< / span >
< / div >
< div id = "projectbrief" > Aaru Data Preservation Suite - Format Library< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
< script type = "text/javascript" >
var searchBox = new SearchBox("searchBox", "search/",'.html');
< / script >
< script type = "text/javascript" >
$(function() { codefold.init(); });
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
< / script >
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
$(function(){initNavTree('spamsum_8c.html','',''); });
< / script >
< div id = "container" >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" > < / div >
< div class = "SRStatus" id = "Loading" > Loading...< / div >
< div class = "SRStatus" id = "Searching" > Searching...< / div >
< div class = "SRStatus" id = "NoMatches" > No Matches< / div >
< / div >
< / div >
< / div >
< / div >
< div class = "header" >
< div class = "headertitle" > < div class = "title" > spamsum.c File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < code > #include < errno.h> < / code > < br / >
< code > #include < stdint.h> < / code > < br / >
< code > #include < stdio.h> < / code > < br / >
< code > #include < stdlib.h> < / code > < br / >
< code > #include < string.h> < / code > < br / >
< code > #include " < a class = "el" href = "aaruformat_8h_source.html" > aaruformat.h< / a > " < / code > < br / >
< code > #include " < a class = "el" href = "spamsum_8h_source.html" > spamsum.h< / a > " < / code > < br / >
< / div >
< p > < a href = "spamsum_8c_source.html" > Go to the source code of this file.< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 id = "header-define-members" class = "groupheader" > < a id = "define-members" name = "define-members" > < / a >
Macros< / h2 > < / td > < / tr >
< tr class = "memitem:a707b15790ae068604c385681b164b64d" id = "r_a707b15790ae068604c385681b164b64d" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a707b15790ae068604c385681b164b64d" > ROLL_SUM< / a > (ctx)< / td > < / tr >
< tr class = "memitem:a0e886062da69d341fbee947ba56cae96" id = "r_a0e886062da69d341fbee947ba56cae96" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a0e886062da69d341fbee947ba56cae96" > SUM_HASH< / a > (c, h)< / td > < / tr >
< tr class = "memitem:a32e1f1b80d38adcc429fdd861289fe12" id = "r_a32e1f1b80d38adcc429fdd861289fe12" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a32e1f1b80d38adcc429fdd861289fe12" > SSDEEP_BS< / a > (index)< / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 id = "header-func-members" class = "groupheader" > < a id = "func-members" name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a793dac760aedda6414ba4014eb2ed0c7" id = "r_a793dac760aedda6414ba4014eb2ed0c7" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a793dac760aedda6414ba4014eb2ed0c7" > aaruf_spamsum_init< / a > (void)< / td > < / tr >
< tr class = "memitem:aefe8cc89b1c87185e7bb4f7b8d1f4c80" id = "r_aefe8cc89b1c87185e7bb4f7b8d1f4c80" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#aefe8cc89b1c87185e7bb4f7b8d1f4c80" > aaruf_spamsum_update< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx, const uint8_t *data, const uint32_t len)< / td > < / tr >
< tr class = "memdesc:aefe8cc89b1c87185e7bb4f7b8d1f4c80" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Updates the spamsum context with new data. < br / > < / td > < / tr >
< tr class = "memitem:a6fe74704e44be7adfaa2ce676f3c3de4" id = "r_a6fe74704e44be7adfaa2ce676f3c3de4" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a6fe74704e44be7adfaa2ce676f3c3de4" > aaruf_spamsum_free< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx)< / td > < / tr >
< tr class = "memdesc:a6fe74704e44be7adfaa2ce676f3c3de4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Frees a spamsum (fuzzy hash) context. < br / > < / td > < / tr >
< tr class = "memitem:a680150d4b3df13261af758c504a1f848" id = "r_a680150d4b3df13261af758c504a1f848" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a680150d4b3df13261af758c504a1f848" > fuzzy_engine_step< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx, uint8_t c)< / td > < / tr >
< tr class = "memitem:a9f287da4a58c0d3ab8f0243de5fe3f8d" id = "r_a9f287da4a58c0d3ab8f0243de5fe3f8d" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a9f287da4a58c0d3ab8f0243de5fe3f8d" > roll_hash< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx, uint8_t c)< / td > < / tr >
< tr class = "memitem:a906ad6bd1809bf999874c848af7c648b" id = "r_a906ad6bd1809bf999874c848af7c648b" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a906ad6bd1809bf999874c848af7c648b" > fuzzy_try_reduce_blockhash< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx)< / td > < / tr >
< tr class = "memitem:a24c6d35239a8d1fee6e93aa12bbd5bd6" id = "r_a24c6d35239a8d1fee6e93aa12bbd5bd6" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a24c6d35239a8d1fee6e93aa12bbd5bd6" > fuzzy_try_fork_blockhash< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx)< / td > < / tr >
< tr class = "memitem:ab1f4894af1962e933767248c4fb0e2e8" id = "r_ab1f4894af1962e933767248c4fb0e2e8" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#ab1f4894af1962e933767248c4fb0e2e8" > aaruf_spamsum_final< / a > (< a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *ctx, uint8_t *result)< / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 id = "header-var-members" class = "groupheader" > < a id = "var-members" name = "var-members" > < / a >
Variables< / h2 > < / td > < / tr >
< tr class = "memitem:a172df0ac676d5a0f2c93001809e53a41" id = "r_a172df0ac676d5a0f2c93001809e53a41" > < td class = "memItemLeft" align = "right" valign = "top" > static uint8_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a172df0ac676d5a0f2c93001809e53a41" > b64< / a > []< / td > < / tr >
< / table >
< a name = "doc-define-members" id = "doc-define-members" > < / a > < h2 id = "header-doc-define-members" class = "groupheader" > Macro Definition Documentation< / h2 >
< a id = "a707b15790ae068604c385681b164b64d" name = "a707b15790ae068604c385681b164b64d" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a707b15790ae068604c385681b164b64d" > ◆   < / a > < / span > ROLL_SUM< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define ROLL_SUM< / td >
< td > (< / td >
< td class = "paramtype" > < / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< b > Value:< / b > < div class = "fragment" > < div class = "line" > ((ctx)-> roll.h1 + (ctx)-> roll.h2 + (ctx)-> roll.h3)< / div >
< / div > <!-- fragment -->
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00080" > 80< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00191" > aaruf_spamsum_final()< / a > , and < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > .< / p >
< / div >
< / div >
< a id = "a32e1f1b80d38adcc429fdd861289fe12" name = "a32e1f1b80d38adcc429fdd861289fe12" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a32e1f1b80d38adcc429fdd861289fe12" > ◆   < / a > < / span > SSDEEP_BS< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define SSDEEP_BS< / td >
< td > (< / td >
< td class = "paramtype" > < / td > < td class = "paramname" > < span class = "paramname" > < em > index< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< b > Value:< / b > < div class = "fragment" > < div class = "line" > (< a class = "code hl_define" href = "spamsum_8h.html#ac5fb50a0e20885df11be19a6b5449749" > MIN_BLOCKSIZE< / a > < < (index))< / div >
< div class = "ttc" id = "aspamsum_8h_html_ac5fb50a0e20885df11be19a6b5449749" > < div class = "ttname" > < a href = "spamsum_8h.html#ac5fb50a0e20885df11be19a6b5449749" > MIN_BLOCKSIZE< / a > < / div > < div class = "ttdeci" > #define MIN_BLOCKSIZE< / div > < div class = "ttdef" > < b > Definition< / b > < a href = "spamsum_8h_source.html#l00029" > spamsum.h:29< / a > < / div > < / div >
< / div > <!-- fragment -->
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00082" > 82< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00191" > aaruf_spamsum_final()< / a > , < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > , and < a class = "el" href = "spamsum_8c_source.html#l00155" > fuzzy_try_reduce_blockhash()< / a > .< / p >
< / div >
< / div >
< a id = "a0e886062da69d341fbee947ba56cae96" name = "a0e886062da69d341fbee947ba56cae96" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a0e886062da69d341fbee947ba56cae96" > ◆   < / a > < / span > SUM_HASH< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define SUM_HASH< / td >
< td > (< / td >
< td class = "paramtype" > < / td > < td class = "paramname" > < span class = "paramname" > < em > c< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < / td > < td class = "paramname" > < span class = "paramname" > < em > h< / em > < / span >   )< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< b > Value:< / b > < div class = "fragment" > < div class = "line" > (((h) * < a class = "code hl_define" href = "spamsum_8h.html#a3340643b9fb0a58333f04e75ff897e03" > HASH_PRIME< / a > ) ^ (c));< / div >
< div class = "ttc" id = "aspamsum_8h_html_a3340643b9fb0a58333f04e75ff897e03" > < div class = "ttname" > < a href = "spamsum_8h.html#a3340643b9fb0a58333f04e75ff897e03" > HASH_PRIME< / a > < / div > < div class = "ttdeci" > #define HASH_PRIME< / div > < div class = "ttdef" > < b > Definition< / b > < a href = "spamsum_8h_source.html#l00028" > spamsum.h:28< / a > < / div > < / div >
< / div > <!-- fragment -->
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00081" > 81< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > .< / p >
< / div >
< / div >
< a name = "doc-func-members" id = "doc-func-members" > < / a > < h2 id = "header-doc-func-members" class = "groupheader" > Function Documentation< / h2 >
< a id = "ab1f4894af1962e933767248c4fb0e2e8" name = "ab1f4894af1962e933767248c4fb0e2e8" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ab1f4894af1962e933767248c4fb0e2e8" > ◆   < / a > < / span > aaruf_spamsum_final()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int aaruf_spamsum_final < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t *< / td > < td class = "paramname" > < span class = "paramname" > < em > result< / em > < / span >   )< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00191" > 191< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , < a class = "el" href = "decls_8h_source.html#l00054" > AARU_EXPORT< / a > , < a class = "el" href = "spamsum_8c_source.html#l00032" > b64< / a > , < a class = "el" href = "spamsum_8h_source.html#l00054" > spamsum_ctx::bh< / a > , < a class = "el" href = "spamsum_8h_source.html#l00053" > spamsum_ctx::bh_end< / a > , < a class = "el" href = "spamsum_8h_source.html#l00052" > spamsum_ctx::bh_start< / a > , < a class = "el" href = "spamsum_8h_source.html#l00038" > blockhash_ctx::d_len< / a > , < a class = "el" href = "spamsum_8h_source.html#l00036" > blockhash_ctx::digest< / a > , < a class = "el" href = "spamsum_8h_source.html#l00030" > FUZZY_MAX_RESULT< / a > , < a class = "el" href = "spamsum_8h_source.html#l00034" > blockhash_ctx::h< / a > , < a class = "el" href = "spamsum_8h_source.html#l00037" > blockhash_ctx::half_digest< / a > , < a class = "el" href = "spamsum_8h_source.html#l00035" > blockhash_ctx::half_h< / a > , < a class = "el" href = "spamsum_8h_source.html#l00025" > NUM_BLOCKHASHES< / a > , < a class = "el" href = "spamsum_8c_source.html#l00080" > ROLL_SUM< / a > , < a class = "el" href = "spamsum_8h_source.html#l00024" > SPAMSUM_LENGTH< / a > , and < a class = "el" href = "spamsum_8c_source.html#l00082" > SSDEEP_BS< / a > .< / p >
2025-12-12 12:25:02 +00:00
< p class = "reference" > Referenced by < a class = "el" href = "close_8c_source.html#l00681" > write_checksum_block()< / a > .< / p >
2025-10-11 01:35:43 +01:00
< / div >
< / div >
< a id = "a6fe74704e44be7adfaa2ce676f3c3de4" name = "a6fe74704e44be7adfaa2ce676f3c3de4" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a6fe74704e44be7adfaa2ce676f3c3de4" > ◆   < / a > < / span > aaruf_spamsum_free()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void aaruf_spamsum_free < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Frees a spamsum (fuzzy hash) context. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > ctx< / td > < td > Pointer to the spamsum context to free. < / td > < / tr >
< / table >
< / dd >
< / dl >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00075" > 75< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , and < a class = "el" href = "decls_8h_source.html#l00054" > AARU_EXPORT< / a > .< / p >
2025-12-12 12:25:02 +00:00
< p class = "reference" > Referenced by < a class = "el" href = "create_8c_source.html#l00030" > cleanup_failed_create()< / a > , and < a class = "el" href = "close_8c_source.html#l00681" > write_checksum_block()< / a > .< / p >
2025-10-11 01:35:43 +01:00
< / div >
< / div >
< a id = "a793dac760aedda6414ba4014eb2ed0c7" name = "a793dac760aedda6414ba4014eb2ed0c7" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a793dac760aedda6414ba4014eb2ed0c7" > ◆   < / a > < / span > aaruf_spamsum_init()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > * aaruf_spamsum_init < / td >
< td > (< / td >
< td class = "paramtype" > void< / td > < td class = "paramname" > < span class = "paramname" > < em > < / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00037" > 37< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , < a class = "el" href = "decls_8h_source.html#l00054" > AARU_EXPORT< / a > , < a class = "el" href = "spamsum_8h_source.html#l00054" > spamsum_ctx::bh< / a > , < a class = "el" href = "spamsum_8h_source.html#l00053" > spamsum_ctx::bh_end< / a > , < a class = "el" href = "spamsum_8h_source.html#l00034" > blockhash_ctx::h< / a > , < a class = "el" href = "spamsum_8h_source.html#l00035" > blockhash_ctx::half_h< / a > , and < a class = "el" href = "spamsum_8h_source.html#l00027" > HASH_INIT< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "create_8c_source.html#l00279" > aaruf_create()< / a > .< / p >
< / div >
< / div >
< a id = "aefe8cc89b1c87185e7bb4f7b8d1f4c80" name = "aefe8cc89b1c87185e7bb4f7b8d1f4c80" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aefe8cc89b1c87185e7bb4f7b8d1f4c80" > ◆   < / a > < / span > aaruf_spamsum_update()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int aaruf_spamsum_update < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const uint8_t *< / td > < td class = "paramname" > < span class = "paramname" > < em > data< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const uint32_t< / td > < td class = "paramname" > < span class = "paramname" > < em > len< / em > < / span >   )< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Updates the spamsum context with new data. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > ctx< / td > < td > Pointer to the spamsum context. < / td > < / tr >
< tr > < td class = "paramname" > data< / td > < td > Pointer to the data to process. < / td > < / tr >
< tr > < td class = "paramname" > len< / td > < td > Length of the data in bytes. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > 0 on success, -1 on error. < / dd > < / dl >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00059" > 59< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , < a class = "el" href = "decls_8h_source.html#l00054" > AARU_EXPORT< / a > , < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > , and < a class = "el" href = "spamsum_8h_source.html#l00055" > spamsum_ctx::total_size< / a > .< / p >
2025-12-12 12:25:02 +00:00
< p class = "reference" > Referenced by < a class = "el" href = "write_8c_source.html#l00098" > aaruf_write_sector()< / a > , and < a class = "el" href = "write_8c_source.html#l00544" > aaruf_write_sector_long()< / a > .< / p >
2025-10-11 01:35:43 +01:00
< / div >
< / div >
< a id = "a680150d4b3df13261af758c504a1f848" name = "a680150d4b3df13261af758c504a1f848" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a680150d4b3df13261af758c504a1f848" > ◆   < / a > < / span > fuzzy_engine_step()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void fuzzy_engine_step < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t< / td > < td class = "paramname" > < span class = "paramname" > < em > c< / em > < / span >   )< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00084" > 84< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "spamsum_8c_source.html#l00032" > b64< / a > , < a class = "el" href = "spamsum_8h_source.html#l00054" > spamsum_ctx::bh< / a > , < a class = "el" href = "spamsum_8h_source.html#l00052" > spamsum_ctx::bh_start< / a > , < a class = "el" href = "spamsum_8h_source.html#l00038" > blockhash_ctx::d_len< / a > , < a class = "el" href = "spamsum_8h_source.html#l00036" > blockhash_ctx::digest< / a > , < a class = "el" href = "spamsum_8c_source.html#l00175" > fuzzy_try_fork_blockhash()< / a > , < a class = "el" href = "spamsum_8c_source.html#l00155" > fuzzy_try_reduce_blockhash()< / a > , < a class = "el" href = "spamsum_8h_source.html#l00034" > blockhash_ctx::h< / a > , < a class = "el" href = "spamsum_8h_source.html#l00037" > blockhash_ctx::half_digest< / a > , < a class = "el" href = "spamsum_8h_source.html#l00035" > blockhash_ctx::half_h< / a > , < a class = "el" href = "spamsum_8h_source.html#l00027" > HASH_INIT< / a > , < a class = "el" href = "spamsum_8c_source.html#l00137" > roll_hash()< / a > , < a class = "el" href = "spamsum_8c_source.html#l00080" > ROLL_SUM< / a > , < a class = "el" href = "spamsum_8h_source.html#l00024" > SPAMSUM_LENGTH< / a > , < a class = "el" href = "spamsum_8c_source.html#l00082" > SSDEEP_BS< / a > , and < a class = "el" href = "spamsum_8c_source.html#l00081" > SUM_HASH< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00059" > aaruf_spamsum_update()< / a > .< / p >
< / div >
< / div >
< a id = "a24c6d35239a8d1fee6e93aa12bbd5bd6" name = "a24c6d35239a8d1fee6e93aa12bbd5bd6" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a24c6d35239a8d1fee6e93aa12bbd5bd6" > ◆   < / a > < / span > fuzzy_try_fork_blockhash()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void fuzzy_try_fork_blockhash < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00175" > 175< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "spamsum_8h_source.html#l00054" > spamsum_ctx::bh< / a > , < a class = "el" href = "spamsum_8h_source.html#l00053" > spamsum_ctx::bh_end< / a > , < a class = "el" href = "spamsum_8h_source.html#l00038" > blockhash_ctx::d_len< / a > , < a class = "el" href = "spamsum_8h_source.html#l00036" > blockhash_ctx::digest< / a > , < a class = "el" href = "spamsum_8h_source.html#l00034" > blockhash_ctx::h< / a > , < a class = "el" href = "spamsum_8h_source.html#l00037" > blockhash_ctx::half_digest< / a > , < a class = "el" href = "spamsum_8h_source.html#l00035" > blockhash_ctx::half_h< / a > , and < a class = "el" href = "spamsum_8h_source.html#l00025" > NUM_BLOCKHASHES< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > .< / p >
< / div >
< / div >
< a id = "a906ad6bd1809bf999874c848af7c648b" name = "a906ad6bd1809bf999874c848af7c648b" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a906ad6bd1809bf999874c848af7c648b" > ◆   < / a > < / span > fuzzy_try_reduce_blockhash()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void fuzzy_try_reduce_blockhash < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00155" > 155< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "spamsum_8h_source.html#l00054" > spamsum_ctx::bh< / a > , < a class = "el" href = "spamsum_8h_source.html#l00053" > spamsum_ctx::bh_end< / a > , < a class = "el" href = "spamsum_8h_source.html#l00052" > spamsum_ctx::bh_start< / a > , < a class = "el" href = "spamsum_8h_source.html#l00038" > blockhash_ctx::d_len< / a > , < a class = "el" href = "spamsum_8h_source.html#l00024" > SPAMSUM_LENGTH< / a > , < a class = "el" href = "spamsum_8c_source.html#l00082" > SSDEEP_BS< / a > , and < a class = "el" href = "spamsum_8h_source.html#l00055" > spamsum_ctx::total_size< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > .< / p >
< / div >
< / div >
< a id = "a9f287da4a58c0d3ab8f0243de5fe3f8d" name = "a9f287da4a58c0d3ab8f0243de5fe3f8d" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a9f287da4a58c0d3ab8f0243de5fe3f8d" > ◆   < / a > < / span > roll_hash()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void roll_hash < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structspamsum__ctx.html" > spamsum_ctx< / a > *< / td > < td class = "paramname" > < span class = "paramname" > < em > ctx< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t< / td > < td class = "paramname" > < span class = "paramname" > < em > c< / em > < / span >   )< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00137" > 137< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "spamsum_8h_source.html#l00044" > roll_state::h1< / a > , < a class = "el" href = "spamsum_8h_source.html#l00045" > roll_state::h2< / a > , < a class = "el" href = "spamsum_8h_source.html#l00046" > roll_state::h3< / a > , < a class = "el" href = "spamsum_8h_source.html#l00047" > roll_state::n< / a > , < a class = "el" href = "spamsum_8h_source.html#l00056" > spamsum_ctx::roll< / a > , < a class = "el" href = "spamsum_8h_source.html#l00026" > ROLLING_WINDOW< / a > , and < a class = "el" href = "spamsum_8h_source.html#l00043" > roll_state::window< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > .< / p >
< / div >
< / div >
< a name = "doc-var-members" id = "doc-var-members" > < / a > < h2 id = "header-doc-var-members" class = "groupheader" > Variable Documentation< / h2 >
< a id = "a172df0ac676d5a0f2c93001809e53a41" name = "a172df0ac676d5a0f2c93001809e53a41" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a172df0ac676d5a0f2c93001809e53a41" > ◆   < / a > < / span > b64< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t b64[]< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel static" > static< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< b > Initial value:< / b > < div class = "fragment" > < div class = "line" > = {0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,< / div >
< div class = "line" > 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,< / div >
< div class = "line" > 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,< / div >
< div class = "line" > 0x77, 0x78, 0x79, 0x7A, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F}< / div >
< / div > <!-- fragment -->
< p class = "definition" > Definition at line < a class = "el" href = "spamsum_8c_source.html#l00032" > 32< / a > of file < a class = "el" href = "spamsum_8c_source.html" > spamsum.c< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "spamsum_8c_source.html#l00191" > aaruf_spamsum_final()< / a > , and < a class = "el" href = "spamsum_8c_source.html#l00084" > fuzzy_engine_step()< / a > .< / p >
< / div >
< / div >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
< div id = "page-nav" class = "page-nav-panel" >
< div id = "page-nav-resize-handle" > < / div >
< div id = "page-nav-tree" >
< div id = "page-nav-contents" >
< / div > <!-- page - nav - contents -->
< / div > <!-- page - nav - tree -->
< / div > <!-- page - nav -->
< / div > <!-- container -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a href = "dir_68267d1309a1af8e8297ef4c3efbcdba.html" > src< / a > < / li > < li class = "navelem" > < a href = "dir_6b3196bdf3f485a11a190486a5644c9a.html" > checksum< / a > < / li > < li class = "navelem" > < a href = "spamsum_8c.html" > spamsum.c< / a > < / li >
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.14.0 < / li >
< / ul >
< / div >
< / body >
< / html >