Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
01e1f04e3This file is pinned to the selected release. Download the original to open it in your design tool.
<!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.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tRacket Sensor: noisemeter-device/secret-store.h Source File</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="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">tRacket Sensor<span id="projectnumber"> 0.2.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_640a2e73a782d0e2711002117fcf2017.html">noisemeter-device</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">secret-store.h</div></div>
</div><!--header-->
<div class="contents">
<a href="secret-store_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">/* noisemeter-device - Firmware for CivicTechTO's Noisemeter Device</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * Copyright (C) 2024 Clyne Sullivan</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> *</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * This program is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> *</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> * This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> *</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * along with this program. If not, see <https://www.gnu.org/licenses/>.</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> */</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#ifndef SECRET_STORE_H</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#define SECRET_STORE_H</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include "<a class="code" href="UUID_8h.html">UUID/UUID.h</a>"</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="foldopen" id="foldopen00024" data-start="{" data-end="};">
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="structSecretStore.html"> 24</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structSecretStore.html">SecretStore</a></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span>{</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_class" href="classUUID.html">UUID</a> key;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="structSecretStore.html#a394bac8732cad978b978cd2ebf0bcb15"> 34</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structSecretStore.html#a394bac8732cad978b978cd2ebf0bcb15">encrypt</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *in, uint8_t *out, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len) <span class="keyword">const</span> <span class="keyword">noexcept</span>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="structSecretStore.html#a1459cfab454a565b8eb6e49c4f47e823"> 42</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structSecretStore.html#a1459cfab454a565b8eb6e49c4f47e823">decrypt</a>(<span class="keyword">const</span> uint8_t *in, <span class="keywordtype">char</span> *out, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len) <span class="keyword">const</span> <span class="keyword">noexcept</span>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">constexpr</span> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> BITS = 256; <span class="comment">// do not change</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>};</div>
</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#endif </span><span class="comment">// SECRET_STORE_H</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="ttc" id="aUUID_8h_html"><div class="ttname"><a href="UUID_8h.html">UUID.h</a></div><div class="ttdoc">Arduino Library for generating UUID's.</div></div>
<div class="ttc" id="aclassUUID_html"><div class="ttname"><a href="classUUID.html">UUID</a></div><div class="ttdef"><b>Definition</b> <a href="UUID_8h_source.html#l00034">UUID.h:35</a></div></div>
<div class="ttc" id="astructSecretStore_html"><div class="ttname"><a href="structSecretStore.html">SecretStore</a></div><div class="ttdef"><b>Definition</b> <a href="secret-store_8h_source.html#l00024">secret-store.h:25</a></div></div>
<div class="ttc" id="astructSecretStore_html_a1459cfab454a565b8eb6e49c4f47e823"><div class="ttname"><a href="structSecretStore.html#a1459cfab454a565b8eb6e49c4f47e823">SecretStore::decrypt</a></div><div class="ttdeci">void decrypt(const uint8_t *in, char *out, unsigned int len) const noexcept</div><div class="ttdoc">Securely decrypts the given string.</div></div>
<div class="ttc" id="astructSecretStore_html_a394bac8732cad978b978cd2ebf0bcb15"><div class="ttname"><a href="structSecretStore.html#a394bac8732cad978b978cd2ebf0bcb15">SecretStore::encrypt</a></div><div class="ttdeci">void encrypt(const char *in, uint8_t *out, unsigned int len) const noexcept</div><div class="ttdoc">Securely encrypts the given string.</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>