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/helpers.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('helpers_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" > helpers.c File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < code > #include < < a class = "el" href = "aaru_8h_source.html" > aaru.h< / a > > < / code > < br / >
< code > #include < < a class = "el" href = "aaruformat_8h_source.html" > aaruformat.h< / a > > < / code > < br / >
2025-10-13 14:26:33 +01:00
< code > #include < stdio.h> < / code > < br / >
< code > #include < stdlib.h> < / code > < br / >
< code > #include < time.h> < / code > < br / >
2025-10-11 01:35:43 +01:00
< / div >
< p > < a href = "helpers_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-func-members" class = "groupheader" > < a id = "func-members" name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a8662fc9d3a4258e332b1727f7338941d" id = "r_a8662fc9d3a4258e332b1727f7338941d" > < td class = "memItemLeft" align = "right" valign = "top" > int32_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a8662fc9d3a4258e332b1727f7338941d" > aaruf_get_media_tag_type_for_datatype< / a > (const int32_t type)< / td > < / tr >
< tr class = "memdesc:a8662fc9d3a4258e332b1727f7338941d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Converts an image data type to an Aaru media tag type. < br / > < / td > < / tr >
< tr class = "memitem:a79bbfb95d80c40c33945bee27d039661" id = "r_a79bbfb95d80c40c33945bee27d039661" > < td class = "memItemLeft" align = "right" valign = "top" > int32_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a79bbfb95d80c40c33945bee27d039661" > aaruf_get_datatype_for_media_tag_type< / a > (const int32_t tag_type)< / td > < / tr >
< tr class = "memdesc:a79bbfb95d80c40c33945bee27d039661" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Converts an Aaru media tag type to an image data type. < br / > < / td > < / tr >
< tr class = "memitem:a9cd4defd02dea61dc984b84ed3204c2c" id = "r_a9cd4defd02dea61dc984b84ed3204c2c" > < td class = "memItemLeft" align = "right" valign = "top" > int32_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a9cd4defd02dea61dc984b84ed3204c2c" > aaruf_get_xml_mediatype< / a > (const int32_t type)< / td > < / tr >
< tr class = "memitem:ac93ebc6d918745be56b680e19bf7e8d5" id = "r_ac93ebc6d918745be56b680e19bf7e8d5" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#ac93ebc6d918745be56b680e19bf7e8d5" > compare_extents< / a > (const void *a, const void *b)< / td > < / tr >
< tr class = "memdesc:ac93ebc6d918745be56b680e19bf7e8d5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Comparison function for sorting < a class = "el" href = "structDumpExtent.html" title = "Inclusive [start,end] logical sector range contributed by a single hardware environment." > DumpExtent< / a > arrays by start sector. < br / > < / td > < / tr >
2025-10-13 14:26:33 +01:00
< tr class = "memitem:a7db9f44b931877b306de9cf7cd1deed2" id = "r_a7db9f44b931877b306de9cf7cd1deed2" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a7db9f44b931877b306de9cf7cd1deed2" > generate_random_bytes< / a > (uint8_t *buffer, size_t length)< / td > < / tr >
< tr class = "memdesc:a7db9f44b931877b306de9cf7cd1deed2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Generates cryptographically strong random bytes. < br / > < / td > < / tr >
2025-10-11 01:35:43 +01:00
< / table >
< a name = "doc-func-members" id = "doc-func-members" > < / a > < h2 id = "header-doc-func-members" class = "groupheader" > Function Documentation< / h2 >
< a id = "a79bbfb95d80c40c33945bee27d039661" name = "a79bbfb95d80c40c33945bee27d039661" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a79bbfb95d80c40c33945bee27d039661" > ◆   < / a > < / span > aaruf_get_datatype_for_media_tag_type()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int32_t aaruf_get_datatype_for_media_tag_type < / td >
< td > (< / td >
< td class = "paramtype" > const int32_t< / td > < td class = "paramname" > < span class = "paramname" > < em > tag_type< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Converts an Aaru media tag type to an image data type. < / p >
< p > Maps the given Aaru media tag type to the corresponding image data type. This is the inverse function of aaruf_get_media_tag_type_for_datatype.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > tag_type< / td > < td > Aaru media tag type identifier. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > Corresponding image data type, or -1 if not found. < / dd > < / dl >
2025-10-13 14:26:33 +01:00
< p class = "definition" > Definition at line < a class = "el" href = "helpers_8c_source.html#l00197" > 197< / a > of file < a class = "el" href = "helpers_8c_source.html" > helpers.c< / a > .< / p >
2025-10-11 01:35:43 +01:00
2025-10-18 17:55:08 +01:00
< p class = "reference" > References < a class = "el" href = "aaru_8h_source.html#l00976" > AACS_CPRM_MKB< / a > , < a class = "el" href = "aaru_8h_source.html#l00974" > AACS_DataKeys< / a > , < a class = "el" href = "aaru_8h_source.html#l00975" > AACS_LBAExtents< / a > , < a class = "el" href = "aaru_8h_source.html#l00972" > AACS_MediaIdentifier< / a > , < a class = "el" href = "aaru_8h_source.html#l00973" > AACS_MKB< / a > , < a class = "el" href = "aaru_8h_source.html#l00971" > AACS_SerialNumber< / a > , < a class = "el" href = "aaru_8h_source.html#l00970" > AACS_VolumeIdentifier< / a > , < a class = "el" href = "enums_8h_source.html#l00083" > AacsDataKeys< / a > , < a class = "el" href = "enums_8h_source.html#l00084" > AacsLbaExtents< / a > , < a class = "el" href = "enums_8h_source.html#l00081" > AacsMediaIdentifier< / a > , < a class = "el" href = "enums_8h_source.html#l00082" > AacsMediaKeyBlock< / a > , < a class = "el" href = "enums_8h_source.html#l00080" > AacsSerialNumber< / a > , < a class = "el" href = "enums_8h_source.html#l00079" > AacsVolumeIdentifier< / a > , < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "aaru_8h_source.html#l00984" > ATA_IDENTIFY< / a > , < a class = "el" href = "enums_8h_source.html#l00093" > AtaIdentify< / a > , < a class = "el" href = "aaru_8h_source.html#l00985" > ATAPI_IDENTIFY< / a > , < a class = "el" href = "enums_8h_source.html#l00094" > AtapiIdentify< / a > , < a class = "el" href = "aaru_8h_source.html#l00966" > BD_BCA< / a > , < a class = "el" href = "aaru_8h_source.html#l00968" > BD_CartridgeStatus< / a > , < a class = "el" href = "aaru_8h_source.html#l00967" > BD_DDS< / a > , < a class = "el" href = "aaru_8h_source.html#l00965" > BD_DI< / a > , < a class = "el" href = "aaru_8h_source.html#l00969" > BD_SpareArea< / a > , < a class = "el" href = "enums_8h_source.html#l00075" > BlurayBca< / a > , < a class = "el" href = "enums_8h_source.html#l00077" > BlurayCartridgeStatus< / a > , < a class = "el" href = "enums_8h_source.html#l00076" > BlurayDds< / a > , < a class = "el" href = "enums_8h_source.html#l00074" > BlurayDi< / a > , < a class = "el" href = "enums_8h_source.html#l00078" > BluraySpareArea< / a > , < a class = "el" href = "aaru_8h_source.html#l00941" > CD_ATIP< / a > , < a class = "el" href = "aaru_8h_source.html#l00998" > CD_FirstTrackPregap< / a > , < a class = "el" href = "aaru_8h_source.html#l00939" > CD_FullTOC< / a > , < a class = "el" href = "aaru_8h_source.html#l01005" > CD_LeadIn< / a > , < a class = "el" href = "aaru_8h_source.html#l00999" > CD_LeadOut< / a > , < a class = "el" href = "aaru_8h_source.html#l00943" > CD_MCN< / a > , < a class = "el" href = "aaru_8h_source.html#l00940" > CD_PMA< / a > , < a class = "el" href = "aaru_8h_source.html#l00938" > CD_SessionInfo< / a > , < a class = "el" href = "aaru_8h_source.html#l00942" > CD_TEXT< / a > , < a class = "el" href = "aaru_8h_source.html#l00937" > CD_TOC< / a > , < a class = "el" href = "enums_8h_source.html#l00051" > CompactDiscAtip< / a > , < a class = "el" href = "enums_8h_source.html#l00107" > CompactDiscFirstTrackPregap< / a > , < a class = "el" href = "enums_8h_source.html#l00124" > CompactDiscLeadIn< / a > , < a class = "el" href = "enums_8h_source.html#l00052" > CompactDiscLeadInCdText< / a > , < a class = "el" href = "enums_8h_source.html#l00108" > CompactDiscLeadOut< / a > , < a class = "el" href = "enums_8h_source.html#l00120" > CompactDiscMediaCatalogueNumber< / a > , < a class = "el" href = "enums_8h_source.html#l00047" > CompactDiscPartialToc< / a > , < a class = "el" href = "enums_8h_source.html#l00050" > CompactDiscPma< / a > , < a class = "el" href = "enums_8h_source.html#l00048" > CompactDiscSessionInfo< / a > , < a class = "el" href = "enums_8h_source.html#l00049" > CompactDiscToc< / a > , < a class = "el" href = "enums_8h_source.html#l00085" > CprmMediaKeyBlock< / a > , < a class = "el" href = "aaru_8h_source.html#l00997" > DiscControlBlock< / a > , < a class = "el" href = "aaru_8h_source.html#l00958" > DVD_ADIP< / a > , < a class = "el" href = "aaru_8h_source.html#l00947" > DVD_BCA< / a > , < a class = "el" href = "aaru_8h_source.html#l00945" > DVD_CMI< / a > , < a class = "el" href = "aaru_8h_source.html#l00946" > DVD_DiscKey< / a > , < a class = "el" href = "aaru_8h_source.html#l01010" > DVD_DiscKey_Decrypted< / a > , < a class = "el" href = "aaru_8h_source.html#l00948" > DVD_DMI< / a > , < a class = "el" href = "aaru_8h_source.html#l00949" > DVD_MediaIdentifier< / a > , < a class = "el" href = "aaru_8h_source.html#l00950" > DVD_MKB< / a > , < a class = "el" href = "aaru_8h_source.html#l00944" > DVD_
2025-10-11 01:35:43 +01:00
< p class = "reference" > Referenced by < a class = "el" href = "close_8c_source.html#l02409" > write_media_tags()< / a > .< / p >
< / div >
< / div >
< a id = "a8662fc9d3a4258e332b1727f7338941d" name = "a8662fc9d3a4258e332b1727f7338941d" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a8662fc9d3a4258e332b1727f7338941d" > ◆   < / a > < / span > aaruf_get_media_tag_type_for_datatype()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int32_t aaruf_get_media_tag_type_for_datatype < / td >
< td > (< / td >
< td class = "paramtype" > const int32_t< / td > < td class = "paramname" > < span class = "paramname" > < em > type< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Converts an image data type to an Aaru media tag type. < / p >
< p > Maps the given image data type to the corresponding Aaru media tag type.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > type< / td > < td > Image data type identifier. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > Corresponding Aaru media tag type, or -1 if not found. < / dd > < / dl >
2025-10-13 14:26:33 +01:00
< p class = "definition" > Definition at line < a class = "el" href = "helpers_8c_source.html#l00039" > 39< / a > of file < a class = "el" href = "helpers_8c_source.html" > helpers.c< / a > .< / p >
2025-10-11 01:35:43 +01:00
2025-10-18 17:55:08 +01:00
< p class = "reference" > References < a class = "el" href = "aaru_8h_source.html#l00976" > AACS_CPRM_MKB< / a > , < a class = "el" href = "aaru_8h_source.html#l00974" > AACS_DataKeys< / a > , < a class = "el" href = "aaru_8h_source.html#l00975" > AACS_LBAExtents< / a > , < a class = "el" href = "aaru_8h_source.html#l00972" > AACS_MediaIdentifier< / a > , < a class = "el" href = "aaru_8h_source.html#l00973" > AACS_MKB< / a > , < a class = "el" href = "aaru_8h_source.html#l00971" > AACS_SerialNumber< / a > , < a class = "el" href = "aaru_8h_source.html#l00970" > AACS_VolumeIdentifier< / a > , < a class = "el" href = "enums_8h_source.html#l00083" > AacsDataKeys< / a > , < a class = "el" href = "enums_8h_source.html#l00084" > AacsLbaExtents< / a > , < a class = "el" href = "enums_8h_source.html#l00081" > AacsMediaIdentifier< / a > , < a class = "el" href = "enums_8h_source.html#l00082" > AacsMediaKeyBlock< / a > , < a class = "el" href = "enums_8h_source.html#l00080" > AacsSerialNumber< / a > , < a class = "el" href = "enums_8h_source.html#l00079" > AacsVolumeIdentifier< / a > , < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "aaru_8h_source.html#l00984" > ATA_IDENTIFY< / a > , < a class = "el" href = "enums_8h_source.html#l00093" > AtaIdentify< / a > , < a class = "el" href = "aaru_8h_source.html#l00985" > ATAPI_IDENTIFY< / a > , < a class = "el" href = "enums_8h_source.html#l00094" > AtapiIdentify< / a > , < a class = "el" href = "aaru_8h_source.html#l00966" > BD_BCA< / a > , < a class = "el" href = "aaru_8h_source.html#l00968" > BD_CartridgeStatus< / a > , < a class = "el" href = "aaru_8h_source.html#l00967" > BD_DDS< / a > , < a class = "el" href = "aaru_8h_source.html#l00965" > BD_DI< / a > , < a class = "el" href = "aaru_8h_source.html#l00969" > BD_SpareArea< / a > , < a class = "el" href = "enums_8h_source.html#l00075" > BlurayBca< / a > , < a class = "el" href = "enums_8h_source.html#l00077" > BlurayCartridgeStatus< / a > , < a class = "el" href = "enums_8h_source.html#l00076" > BlurayDds< / a > , < a class = "el" href = "enums_8h_source.html#l00074" > BlurayDi< / a > , < a class = "el" href = "enums_8h_source.html#l00078" > BluraySpareArea< / a > , < a class = "el" href = "aaru_8h_source.html#l00941" > CD_ATIP< / a > , < a class = "el" href = "aaru_8h_source.html#l00998" > CD_FirstTrackPregap< / a > , < a class = "el" href = "aaru_8h_source.html#l00939" > CD_FullTOC< / a > , < a class = "el" href = "aaru_8h_source.html#l01005" > CD_LeadIn< / a > , < a class = "el" href = "aaru_8h_source.html#l00999" > CD_LeadOut< / a > , < a class = "el" href = "aaru_8h_source.html#l00943" > CD_MCN< / a > , < a class = "el" href = "aaru_8h_source.html#l00940" > CD_PMA< / a > , < a class = "el" href = "aaru_8h_source.html#l00938" > CD_SessionInfo< / a > , < a class = "el" href = "aaru_8h_source.html#l00942" > CD_TEXT< / a > , < a class = "el" href = "aaru_8h_source.html#l00937" > CD_TOC< / a > , < a class = "el" href = "enums_8h_source.html#l00051" > CompactDiscAtip< / a > , < a class = "el" href = "enums_8h_source.html#l00107" > CompactDiscFirstTrackPregap< / a > , < a class = "el" href = "enums_8h_source.html#l00124" > CompactDiscLeadIn< / a > , < a class = "el" href = "enums_8h_source.html#l00052" > CompactDiscLeadInCdText< / a > , < a class = "el" href = "enums_8h_source.html#l00108" > CompactDiscLeadOut< / a > , < a class = "el" href = "enums_8h_source.html#l00120" > CompactDiscMediaCatalogueNumber< / a > , < a class = "el" href = "enums_8h_source.html#l00047" > CompactDiscPartialToc< / a > , < a class = "el" href = "enums_8h_source.html#l00050" > CompactDiscPma< / a > , < a class = "el" href = "enums_8h_source.html#l00048" > CompactDiscSessionInfo< / a > , < a class = "el" href = "enums_8h_source.html#l00049" > CompactDiscToc< / a > , < a class = "el" href = "enums_8h_source.html#l00085" > CprmMediaKeyBlock< / a > , < a class = "el" href = "aaru_8h_source.html#l00997" > DiscControlBlock< / a > , < a class = "el" href = "aaru_8h_source.html#l00958" > DVD_ADIP< / a > , < a class = "el" href = "aaru_8h_source.html#l00947" > DVD_BCA< / a > , < a class = "el" href = "aaru_8h_source.html#l00945" > DVD_CMI< / a > , < a class = "el" href = "aaru_8h_source.html#l00946" > DVD_DiscKey< / a > , < a class = "el" href = "aaru_8h_source.html#l01010" > DVD_DiscKey_Decrypted< / a > , < a class = "el" href = "aaru_8h_source.html#l00948" > DVD_DMI< / a > , < a class = "el" href = "aaru_8h_source.html#l00949" > DVD_MediaIdentifier< / a > , < a class = "el" href = "aaru_8h_source.html#l00950" > DVD_MKB< / a > , < a class = "el" href = "aaru_8h_source.html#l00944" > DVD_
2025-10-11 01:35:43 +01:00
< p class = "reference" > Referenced by < a class = "el" href = "data_8c_source.html#l00071" > process_data_block()< / a > .< / p >
< / div >
< / div >
< a id = "a9cd4defd02dea61dc984b84ed3204c2c" name = "a9cd4defd02dea61dc984b84ed3204c2c" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a9cd4defd02dea61dc984b84ed3204c2c" > ◆   < / a > < / span > aaruf_get_xml_mediatype()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int32_t aaruf_get_xml_mediatype < / td >
< td > (< / td >
< td class = "paramtype" > const int32_t< / td > < td class = "paramname" > < span class = "paramname" > < em > type< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2025-10-13 14:26:33 +01:00
< p class = "definition" > Definition at line < a class = "el" href = "helpers_8c_source.html#l00347" > 347< / a > of file < a class = "el" href = "helpers_8c_source.html" > helpers.c< / a > .< / p >
2025-10-11 01:35:43 +01:00
2025-10-11 12:43:39 +01:00
< p class = "reference" > References < a class = "el" href = "decls_8h_source.html#l00045" > AARU_CALL< / a > , < a class = "el" href = "decls_8h_source.html#l00055" > AARU_LOCAL< / a > , < a class = "el" href = "aaru_8h_source.html#l00160" > BDR< / a > , < a class = "el" href = "aaru_8h_source.html#l00161" > BDRE< / a > , < a class = "el" href = "aaru_8h_source.html#l00163" > BDREXL< / a > , < a class = "el" href = "aaru_8h_source.html#l00159" > BDROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00162" > BDRXL< / a > , < a class = "el" href = "enums_8h_source.html#l00219" > BlockMedia< / a > , < a class = "el" href = "aaru_8h_source.html#l00170" > CBHD< / a > , < a class = "el" href = "aaru_8h_source.html#l00106" > CD< / a > , < a class = "el" href = "aaru_8h_source.html#l00237" > CD32< / a > , < a class = "el" href = "aaru_8h_source.html#l00107" > CDDA< / a > , < a class = "el" href = "aaru_8h_source.html#l00109" > CDEG< / a > , < a class = "el" href = "aaru_8h_source.html#l00108" > CDG< / a > , < a class = "el" href = "aaru_8h_source.html#l00110" > CDI< / a > , < a class = "el" href = "aaru_8h_source.html#l00130" > CDIREADY< / a > , < a class = "el" href = "aaru_8h_source.html#l00126" > CDMIDI< / a > , < a class = "el" href = "aaru_8h_source.html#l00114" > CDMO< / a > , < a class = "el" href = "aaru_8h_source.html#l00117" > CDMRW< / a > , < a class = "el" href = "aaru_8h_source.html#l00113" > CDPLUS< / a > , < a class = "el" href = "aaru_8h_source.html#l00115" > CDR< / a > , < a class = "el" href = "aaru_8h_source.html#l00111" > CDROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00112" > CDROMXA< / a > , < a class = "el" href = "aaru_8h_source.html#l00116" > CDRW< / a > , < a class = "el" href = "aaru_8h_source.html#l00236" > CDTV< / a > , < a class = "el" href = "aaru_8h_source.html#l00127" > CDV< / a > , < a class = "el" href = "aaru_8h_source.html#l00122" > DDCD< / a > , < a class = "el" href = "aaru_8h_source.html#l00123" > DDCDR< / a > , < a class = "el" href = "aaru_8h_source.html#l00124" > DDCDRW< / a > , < a class = "el" href = "aaru_8h_source.html#l00125" > DTSCD< / a > , < a class = "el" href = "aaru_8h_source.html#l00146" > DVDDownload< / a > , < a class = "el" href = "aaru_8h_source.html#l00139" > DVDPR< / a > , < a class = "el" href = "aaru_8h_source.html#l00143" > DVDPRDL< / a > , < a class = "el" href = "aaru_8h_source.html#l00140" > DVDPRW< / a > , < a class = "el" href = "aaru_8h_source.html#l00141" > DVDPRWDL< / a > , < a class = "el" href = "aaru_8h_source.html#l00137" > DVDR< / a > , < a class = "el" href = "aaru_8h_source.html#l00144" > DVDRAM< / a > , < a class = "el" href = "aaru_8h_source.html#l00142" > DVDRDL< / a > , < a class = "el" href = "aaru_8h_source.html#l00136" > DVDROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00138" > DVDRW< / a > , < a class = "el" href = "aaru_8h_source.html#l00145" > DVDRWDL< / a > , < a class = "el" href = "aaru_8h_source.html#l00167" > EVD< / a > , < a class = "el" href = "aaru_8h_source.html#l00174" > FDDVD< / a > , < a class = "el" href = "aaru_8h_source.html#l00132" > FMTOWNS< / a > , < a class = "el" href = "aaru_8h_source.html#l00168" > FVD< / a > , < a class = "el" href = "aaru_8h_source.html#l00224" > GDR< / a > , < a class = "el" href = "aaru_8h_source.html#l00223" > GDROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00502" > GOD< / a > , < a class = "el" href = "aaru_8h_source.html#l00152" > HDDVDR< / a > , < a class = "el" href = "aaru_8h_source.html#l00151" > HDDVDRAM< / a > , < a class = "el" href = "aaru_8h_source.html#l00154" > HDDVDRDL< / a > , < a class = "el" href = "aaru_8h_source.html#l00150" > HDDVDROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00153" > HDDVDRW< / a > , < a class = "el" href = "aaru_8h_source.html#l00155" > HDDVDRWDL< / a > , < a class = "el" href = "aaru_8h_source.html#l00171" > HDVMD< / a > , < a class = "el" href = "aaru_8h_source.html#l00169" > HVD< / a > , < a class = "el" href = "aaru_8h_source.html#l00232" > JaguarCD< / a > , < a class = "el" href = "aaru_8h_source.html#l00178" > LD< / a > , < a class = "el" href = "aaru_8h_source.html#l00179" > LDROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00180" > LDROM2< / a > , < a class = "el" href = "aaru_8h_source.html#l00181" > LVROM< / a > , < a class = "el" href = "aaru_8h_source.html#l00221" > MEGACD< / a > , < a class = "el" href = "aaru_8h_source.html#l00182" > MegaLD< / a > , < a class = "el" href = "aaru_8h_source.html#l00226" > MilCD< / a > , < a class = "el" href = "aaru_8h_source.html#l00235" > NeoGeoCD< / a > , < a class = "el" href = "aaru_8h_source.html#l00238" > Nuon< / a > , < a class = "el" href = "enums_8h_source.html#l00218" > OpticalDisc< / a > , < a class = "el" href = "aaru_8h_source.html#l00120" > PCD< / a > , < a class = "el"
2025-10-11 01:35:43 +01:00
< p class = "reference" > Referenced by < a class = "el" href = "create_8c_source.html#l00279" > aaruf_create()< / a > , and < a class = "el" href = "open_8c_source.html#l00125" > aaruf_open()< / a > .< / p >
< / div >
< / div >
< a id = "ac93ebc6d918745be56b680e19bf7e8d5" name = "ac93ebc6d918745be56b680e19bf7e8d5" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ac93ebc6d918745be56b680e19bf7e8d5" > ◆   < / a > < / span > compare_extents()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int compare_extents < / td >
< td > (< / td >
< td class = "paramtype" > const void *< / td > < td class = "paramname" > < span class = "paramname" > < em > a< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const void *< / td > < td class = "paramname" > < span class = "paramname" > < em > b< / em > < / span >   )< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Comparison function for sorting < a class = "el" href = "structDumpExtent.html" title = "Inclusive [start,end] logical sector range contributed by a single hardware environment." > DumpExtent< / a > arrays by start sector. < / p >
< p > This function is used by qsort() to order dump extents in ascending order based on their start sector values. Extents with lower start sectors will appear first in the sorted array. This ordering is important for efficient extent lookup and validation during image operations.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > a< / td > < td > Pointer to the first < a class = "el" href = "structDumpExtent.html" title = "Inclusive [start,end] logical sector range contributed by a single hardware environment." > DumpExtent< / a > to compare. < / td > < / tr >
< tr > < td class = "paramname" > b< / td > < td > Pointer to the second < a class = "el" href = "structDumpExtent.html" title = "Inclusive [start,end] logical sector range contributed by a single hardware environment." > DumpExtent< / a > to compare. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > Negative value if a-> start < b-> start, zero if equal, positive if a-> start > b-> start. < / dd > < / dl >
2025-10-13 14:26:33 +01:00
< p class = "definition" > Definition at line < a class = "el" href = "helpers_8c_source.html#l00459" > 459< / a > of file < a class = "el" href = "helpers_8c_source.html" > helpers.c< / a > .< / p >
2025-10-11 01:35:43 +01:00
< p class = "reference" > References < a class = "el" href = "context_8h_source.html#l00334" > DumpExtent::start< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "dump_8c_source.html#l00531" > aaruf_set_dumphw()< / a > , and < a class = "el" href = "blocks_2dump_8c_source.html#l00108" > process_dumphw_block()< / a > .< / p >
2025-10-13 14:26:33 +01:00
< / div >
< / div >
< a id = "a7db9f44b931877b306de9cf7cd1deed2" name = "a7db9f44b931877b306de9cf7cd1deed2" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a7db9f44b931877b306de9cf7cd1deed2" > ◆   < / a > < / span > generate_random_bytes()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void generate_random_bytes < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t *< / td > < td class = "paramname" > < span class = "paramname" > < em > buffer< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > size_t< / td > < td class = "paramname" > < span class = "paramname" > < em > length< / em > < / span >   )< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Generates cryptographically strong random bytes. < / p >
< p > This function fills the provided buffer with random bytes using platform-appropriate cryptographic random number generators. On Unix-like systems (including macOS and Linux), it reads from /dev/urandom. On Windows, it uses CryptGenRandom. If the platform-specific methods fail, it falls back to a time-seeded pseudo-random generator.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > buffer< / td > < td > Pointer to the buffer to fill with random bytes. < / td > < / tr >
< tr > < td class = "paramname" > length< / td > < td > Number of random bytes to generate. < / td > < / tr >
< / table >
< / dd >
< / dl >
< p class = "definition" > Definition at line < a class = "el" href = "helpers_8c_source.html#l00480" > 480< / a > of file < a class = "el" href = "helpers_8c_source.html" > helpers.c< / a > .< / p >
< p class = "reference" > Referenced by < a class = "el" href = "create_8c_source.html#l00279" > aaruf_create()< / a > .< / p >
2025-10-11 01:35:43 +01:00
< / 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 = "helpers_8c.html" > helpers.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 >