2022-05-08 19:59:26 +00: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" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
2022-05-08 22:01:23 +00:00
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
< meta name = "generator" content = "Doxygen 1.8.17" / >
2022-05-08 19:59:26 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > GpgFrontend Project: GpgFrontend::RawAPI Namespace 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 >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.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 >
2022-05-08 22:01:23 +00:00
< tr style = "height: 56px;" >
< td id = "projectalign" style = "padding-left: 0.5em;" >
2022-05-08 19:59:26 +00:00
< div id = "projectname" > GpgFrontend Project
< / div >
< div id = "projectbrief" > A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2022-05-08 22:01:23 +00:00
<!-- Generated by Doxygen 1.8.17 -->
2022-05-08 19:59:26 +00:00
< script type = "text/javascript" >
2022-05-08 22:01:23 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
2022-05-08 19:59:26 +00:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
2022-05-08 22:01:23 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2022-05-08 19:59:26 +00:00
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2022-05-08 22:01:23 +00:00
/* @license-end */< / script >
2022-05-08 19:59:26 +00:00
< 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" >
2022-05-08 22:01:23 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2022-05-08 19:59:26 +00:00
$(document).ready(function(){initNavTree('namespaceGpgFrontend_1_1RawAPI.html',''); initResizable(); });
/* @license-end */
< / script >
< 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" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#func-members" > Functions< / a > < / div >
2022-05-08 22:01:23 +00:00
< div class = "headertitle" >
< div class = "title" > GpgFrontend::RawAPI Namespace Reference< / div > < / div >
2022-05-08 19:59:26 +00:00
< / div > <!-- header -->
< div class = "contents" >
< table class = "memberdecls" >
2022-05-08 22:01:23 +00:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
2022-05-08 19:59:26 +00:00
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a1f2f6c82e9c904c3875a123a65564697" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespaceGpgFrontend_1_1RawAPI.html#a1f2f6c82e9c904c3875a123a65564697" > aes_256_cbc_init< / a > (uint8_t *key_data, int key_data_len, uint8_t *salt, EVP_CIPHER_CTX *e_ctx, EVP_CIPHER_CTX *d_ctx)< / td > < / tr >
< tr class = "memdesc:a1f2f6c82e9c904c3875a123a65564697" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Create a 256 bit key and IV using the supplied key_data. salt can be added for taste. Fills in the encryption and decryption ctx objects and returns 0 on success. < a href = "namespaceGpgFrontend_1_1RawAPI.html#a1f2f6c82e9c904c3875a123a65564697" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a1f2f6c82e9c904c3875a123a65564697" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa2bc88cf78b8da893f1b5c7e2e8ccf42" > < td class = "memItemLeft" align = "right" valign = "top" > uint8_t *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespaceGpgFrontend_1_1RawAPI.html#aa2bc88cf78b8da893f1b5c7e2e8ccf42" > aes_256_cbc_encrypt< / a > (EVP_CIPHER_CTX *e, uint8_t *plaintext, int *len)< / td > < / tr >
< tr class = "memdesc:aa2bc88cf78b8da893f1b5c7e2e8ccf42" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Encrypt *len bytes of data All data going in & out is considered binary (uint8_t[]) < a href = "namespaceGpgFrontend_1_1RawAPI.html#aa2bc88cf78b8da893f1b5c7e2e8ccf42" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aa2bc88cf78b8da893f1b5c7e2e8ccf42" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2e388ecafc7b859eda84b4e3c4e2576f" > < td class = "memItemLeft" align = "right" valign = "top" > uint8_t *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespaceGpgFrontend_1_1RawAPI.html#a2e388ecafc7b859eda84b4e3c4e2576f" > aes_256_cbc_decrypt< / a > (EVP_CIPHER_CTX *e, uint8_t *ciphertext, int *len)< / td > < / tr >
< tr class = "memdesc:a2e388ecafc7b859eda84b4e3c4e2576f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Decrypt *len bytes of ciphertext. < a href = "namespaceGpgFrontend_1_1RawAPI.html#a2e388ecafc7b859eda84b4e3c4e2576f" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a2e388ecafc7b859eda84b4e3c4e2576f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
2022-05-08 22:01:23 +00:00
< div class = "textblock" > < p > Copyright (C) 2021 Saturneric< / p >
< p > This file is part of < a class = "el" href = "namespaceGpgFrontend.html" > GpgFrontend< / a > .< / p >
< p > < a class = "el" href = "namespaceGpgFrontend.html" > GpgFrontend< / a > is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.< / p >
< p > < a class = "el" href = "namespaceGpgFrontend.html" > GpgFrontend< / a > is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.< / p >
< p > You should have received a copy of the GNU General Public License along with < a class = "el" href = "namespaceGpgFrontend.html" > GpgFrontend< / a > . If not, see < a href = "https://www.gnu.org/licenses/" > https://www.gnu.org/licenses/< / a > .< / p >
< p > The initial version of the source code is inherited from the gpg4usb project, which is under GPL-3.0-or-later.< / p >
< p > All the source code of < a class = "el" href = "namespaceGpgFrontend.html" > GpgFrontend< / a > was modified and released by Saturneric< a href = "#" onclick = "location.href='mai'+'lto:'+'eri'+'c@'+'bkt'+'us'+'.co'+'m'; return false;" > eric@< span style = "display: none;" > .nosp@m.< / span > bktu< span style = "display: none;" > .nosp@m.< / span > s.com< / a > starting on May 12, 2021.< / p >
< p > SPDX-License-Identifier: GPL-3.0-or-later< / p >
< p > AES encryption/decryption demo program using OpenSSL EVP apis gcc -Wall openssl_aes.c -lcrypto this is public domain code. Saju Pillai (< a href = "#" onclick = "location.href='mai'+'lto:'+'saj'+'u.'+'pil'+'la'+'i@g'+'ma'+'il.'+'co'+'m'; return false;" > saju.< span style = "display: none;" > .nosp@m.< / span > pill< span style = "display: none;" > .nosp@m.< / span > ai@gm< span style = "display: none;" > .nosp@m.< / span > ail.< span style = "display: none;" > .nosp@m.< / span > com< / a > ) < / p >
2022-05-08 19:59:26 +00:00
< / div > < h2 class = "groupheader" > Function Documentation< / h2 >
2022-05-08 22:01:23 +00:00
< a id = "a2e388ecafc7b859eda84b4e3c4e2576f" > < / a >
2022-05-08 19:59:26 +00:00
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a2e388ecafc7b859eda84b4e3c4e2576f" > ◆ < / a > < / span > aes_256_cbc_decrypt()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t * GpgFrontend::RawAPI::aes_256_cbc_decrypt < / td >
< td > (< / td >
< td class = "paramtype" > EVP_CIPHER_CTX *  < / td >
< td class = "paramname" > < em > e< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > ciphertext< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int *  < / td >
< td class = "paramname" > < em > len< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Decrypt *len bytes of ciphertext. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > e< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > ciphertext< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > len< / td > < td > < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > uint8_t* < / dd > < / dl >
< / div >
< / div >
2022-05-08 22:01:23 +00:00
< a id = "aa2bc88cf78b8da893f1b5c7e2e8ccf42" > < / a >
2022-05-08 19:59:26 +00:00
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aa2bc88cf78b8da893f1b5c7e2e8ccf42" > ◆ < / a > < / span > aes_256_cbc_encrypt()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t * GpgFrontend::RawAPI::aes_256_cbc_encrypt < / td >
< td > (< / td >
< td class = "paramtype" > EVP_CIPHER_CTX *  < / td >
< td class = "paramname" > < em > e< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > plaintext< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int *  < / td >
< td class = "paramname" > < em > len< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Encrypt *len bytes of data All data going in & out is considered binary (uint8_t[]) < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > e< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > plaintext< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > len< / td > < td > < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > uint8_t* < / dd > < / dl >
< / div >
< / div >
2022-05-08 22:01:23 +00:00
< a id = "a1f2f6c82e9c904c3875a123a65564697" > < / a >
2022-05-08 19:59:26 +00:00
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a1f2f6c82e9c904c3875a123a65564697" > ◆ < / a > < / span > aes_256_cbc_init()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int GpgFrontend::RawAPI::aes_256_cbc_init < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > key_data< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > key_data_len< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > salt< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > EVP_CIPHER_CTX *  < / td >
< td class = "paramname" > < em > e_ctx< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > EVP_CIPHER_CTX *  < / td >
< td class = "paramname" > < em > d_ctx< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Create a 256 bit key and IV using the supplied key_data. salt can be added for taste. Fills in the encryption and decryption ctx objects and returns 0 on success. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > key_data< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > key_data_len< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > salt< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > e_ctx< / td > < td > < / td > < / tr >
< tr > < td class = "paramname" > d_ctx< / td > < td > < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > int < / dd > < / dl >
< / div >
< / div >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a class = "el" href = "namespaceGpgFrontend.html" > GpgFrontend< / a > < / li > < li class = "navelem" > < a class = "el" href = "namespaceGpgFrontend_1_1RawAPI.html" > RawAPI< / a > < / li >
2022-05-08 22:01:23 +00:00
< li class = "footer" > Generated by
< a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / > < / a > 1.8.17 < / li >
2022-05-08 19:59:26 +00:00
< / ul >
< / div >
< / body >
< / html >