<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>proxygen: proxygen/fizz/fizz/server/test/AeadTicketCipherTest.cpp 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="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>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</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 style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">proxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </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">
$(document).ready(function(){initNavTree('AeadTicketCipherTest_8cpp_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">AeadTicketCipherTest.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="AeadTicketCipherTest_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *  Copyright (c) 2018-present, Facebook, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *  All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *  This source code is licensed under the BSD-style license found in the</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *  LICENSE file in the root directory of this source tree.</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;gmock/gmock.h&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;gtest/gtest.h&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="AeadTicketCipher_8h.html">fizz/server/AeadTicketCipher.h</a>&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="fizz_2fizz_2crypto_2aead_2test_2Mocks_8h.html">fizz/crypto/aead/test/Mocks.h</a>&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="fizz_2fizz_2crypto_2test_2Mocks_8h.html">fizz/crypto/test/Mocks.h</a>&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="fizz_2fizz_2crypto_2test_2TestUtil_8h.html">fizz/crypto/test/TestUtil.h</a>&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="String_8h.html">folly/String.h</a>&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacefizz_1_1test.html">fizz::test</a>;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacefolly.html">folly</a>;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacetesting.html">testing</a>;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#aac60ced510e6c5b36db4b023142fe059">   23</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#aac60ced510e6c5b36db4b023142fe059">ticketSecret1</a>{</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="stringliteral">&quot;90a791cf38c0b5c20447ef029ae1bc4bf3eecc2e85042174497671835ceaccd9&quot;</span>};</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">// secret: 13deec41c45b2f1c4f595ad5972d13047fba09031ba53140c751380e74114cc4</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">// salt: 4444444444444444444444444444444444444444444444444444444444444444</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">// hkdf output: c951156f3dcb1ab243a3f2c8e4346bec92cb25d241ae821484081388</span></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#af82a5a07942b0d09d845c4505c368bc6">   28</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#af82a5a07942b0d09d845c4505c368bc6">ticket1</a>{</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="stringliteral">&quot;444444444444444444444444444444444444444444444444444444444444444400000000579bb5b10c83d7a581f6b8f7bd25acde3dabfe6f59e5147bde86681831&quot;</span>};</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#a824b473c301f043f1e39eb1ad2d40dd9">   30</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#a824b473c301f043f1e39eb1ad2d40dd9">ticket2</a>{</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="stringliteral">&quot;444444444444444444444444444444444444444444444444444444444444444400000001f444b4f0a0d1dd8b26d3a0afa275b4f6956cfdce4857f9ec46177d0ff9&quot;</span>};</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#a4bea7eb0d48ce97ed7bd5a54d9d55205">   33</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#a4bea7eb0d48ce97ed7bd5a54d9d55205">ticketSecret2</a>{</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="stringliteral">&quot;04de0343a34c12f17f8b9696443d55e533ca1eef92bdba6634a46b604e51436d&quot;</span>};</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">// secret: d2c07e1107d3024bd08ebf34d59b9726d05bd7082da80cbb1e90b879e0770b5f</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">// salt: 5cef31d266ca1fe1d634de9b95668d3d8895d4837d3ba81787185ff51c056e95</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">// hkdf output: f7d80b07236875b5a48bdc5bd4642a775c05c231b9507285675c1e0b</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#ab308dca0c8a23fd3ccc4941097db4267">   38</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#ab308dca0c8a23fd3ccc4941097db4267">ticket3</a>{</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="stringliteral">&quot;5cef31d266ca1fe1d634de9b95668d3d8895d4837d3ba81787185ff51c056e95000000005d19a72a3becb5b063346fdf1ec6f9d9d4ddd82cb5f34a8ba0d19e4b69&quot;</span>};</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">// Uses context &#39;foobar&#39;</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#a8d096c8bac0c042faabc1aef89b0207d">   42</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#a8d096c8bac0c042faabc1aef89b0207d">ticket4</a>{</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="stringliteral">&quot;5cef31d266ca1fe1d634de9b95668d3d8895d4837d3ba81787185ff51c056e95000000005b2168cc0fda4f9987b5e9d045845ba4809ac5189158c578c0e5d11b00&quot;</span>};</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="AeadTicketCipherTest_8cpp.html#a5cfe695e2acca33b0687d53ff339920d">   45</a></span>&#160;<span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">StringPiece</a> <a class="code" href="AeadTicketCipherTest_8cpp.html#a5cfe695e2acca33b0687d53ff339920d">badTicket</a>{</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="stringliteral">&quot;5d19a72a3becb5b061346fdf1ec6f9d9d4ddd82cb5f34a8ba0d19e4b69&quot;</span>};</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacefizz.html">fizz</a> {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">namespace </span>server {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacetest.html">test</a> {</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance.html">   52</a></span>&#160;<span class="keyword">class </span><a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance.html">MockTicketCodecInstance</a> {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h.html#a6f76aeb56f492cfe538e177b6aa77965">MOCK_CONST_METHOD1</a>(_encode, <a class="code" href="namespacefizz.html#af020f21a568ff86800e03d6ad2a9b84d">Buf</a>(<a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a>&amp; <a class="code" href="http__parser_8c.html#adc6e5733fc3c22f0a7b2914188c49c90">state</a>));</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h.html#a31c489715704817a3f40d178404c61e8">MOCK_CONST_METHOD2</a>(</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      _decode,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;      <a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a>(<a class="code" href="namespacefizz.html#af020f21a568ff86800e03d6ad2a9b84d">Buf</a>&amp; encoded, <span class="keyword">const</span> <a class="code" href="classfizz_1_1server_1_1FizzServerContext.html">FizzServerContext</a>* <a class="code" href="fizz_2build___2CMakeCache_8txt.html#a261f9f58ccbeaa962c4e675e4212c9cc">context</a>));</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;};</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html">   60</a></span>&#160;<span class="keyword">class </span><a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html">MockTicketCodec</a> {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#ac29627e57ec1c8b558092a0f79a0249f">   62</a></span>&#160;  <span class="keyword">static</span> constexpr <a class="code" href="classfolly_1_1Range.html">folly::StringPiece</a> Label{<span class="stringliteral">&quot;Mock Ticket Codec&quot;</span>};</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a27eba9fd779054f5394ad8f6db29d673">   63</a></span>&#160;  <span class="keyword">static</span> <a class="code" href="namespacefizz.html#af020f21a568ff86800e03d6ad2a9b84d">Buf</a> <a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a27eba9fd779054f5394ad8f6db29d673">encode</a>(<a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a> <a class="code" href="http__parser_8c.html#adc6e5733fc3c22f0a7b2914188c49c90">state</a>) {</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordflow">return</span> instance-&gt;_encode(state);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  }</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a7883e90f8814089caaf468a2fedc4cf9">   66</a></span>&#160;  <span class="keyword">static</span> <a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a> <a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a7883e90f8814089caaf468a2fedc4cf9">decode</a>(<a class="code" href="namespacefizz.html#af020f21a568ff86800e03d6ad2a9b84d">Buf</a> encoded, <span class="keyword">const</span> <a class="code" href="classfizz_1_1server_1_1FizzServerContext.html">FizzServerContext</a>* <a class="code" href="fizz_2build___2CMakeCache_8txt.html#a261f9f58ccbeaa962c4e675e4212c9cc">context</a>) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">return</span> instance-&gt;_decode(encoded, context);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  }</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a7838c130b62e0ceacfbca4f0d36be548">   69</a></span>&#160;  <span class="keyword">static</span> <a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance.html">MockTicketCodecInstance</a>* <a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a7838c130b62e0ceacfbca4f0d36be548">instance</a>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;};</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance.html">MockTicketCodecInstance</a>* MockTicketCodec::instance;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;constexpr <a class="code" href="classfolly_1_1Range.html">folly::StringPiece</a> MockTicketCodec::Label;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keyword">using</span> <a class="code" href="classfizz_1_1server_1_1AeadTicketCipher.html">TestAeadTicketCipher</a> = <a class="code" href="classfizz_1_1server_1_1AeadTicketCipher.html">AeadTicketCipher</a>&lt;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <a class="code" href="classfizz_1_1OpenSSLEVPCipher.html">OpenSSLEVPCipher&lt;AESGCM128&gt;</a>,</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html">MockTicketCodec</a>,</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#abe75a97e6be16b3f0ae585e8171529bb">   77</a></span>&#160;    <a class="code" href="classfizz_1_1HkdfImpl.html">HkdfImpl&lt;Sha256&gt;</a>&gt;;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">   79</a></span>&#160;<span class="keyword">class </span><a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a> : <span class="keyword">public</span> <a class="code" href="classtesting_1_1Test.html">Test</a> {</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  ~<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a85180d3e315fa556530e744c5aa365b7">   82</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a85180d3e315fa556530e744c5aa365b7">SetUp</a>()<span class="keyword"> override </span>{</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    MockTicketCodec::instance = &amp;<a class="code" href="CompressionTest_8cpp.html#a3a8e55a3e3def7bbb4e6e1ca23b441e4">codec_</a>;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a473ad5f2ca0ec020e2b9e4bcd107a308">   87</a></span>&#160;  <a class="code" href="classfizz_1_1server_1_1AeadTicketCipher.html">TestAeadTicketCipher</a> <a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a473ad5f2ca0ec020e2b9e4bcd107a308">cipher_</a>;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#ab2fd9451760c4e7446e7756b28a9fd5a">   88</a></span>&#160;  <a class="code" href="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance.html">MockTicketCodecInstance</a> <a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#ab2fd9451760c4e7446e7756b28a9fd5a">codec_</a>;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#aa8204c7f7fddca5dd74dfb160291a4dc">   90</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#aa8204c7f7fddca5dd74dfb160291a4dc">setTicketSecrets</a>(<a class="code" href="Conv_8cpp.html#ae1adbce218e7a9d09164012443191d24">std::string</a> pskContext = <span class="stringliteral">&quot;&quot;</span>) {</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">if</span> (!pskContext.empty()) {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      cipher_ = <a class="code" href="namespacefizz_1_1server_1_1test.html#abe75a97e6be16b3f0ae585e8171529bb">TestAeadTicketCipher</a>(pskContext);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      cipher_ = <a class="code" href="namespacefizz_1_1server_1_1test.html#abe75a97e6be16b3f0ae585e8171529bb">TestAeadTicketCipher</a>();</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keyword">auto</span> s1 = <a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#aac60ced510e6c5b36db4b023142fe059">ticketSecret1</a>);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keyword">auto</span> s2 = <a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#a4bea7eb0d48ce97ed7bd5a54d9d55205">ticketSecret2</a>);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    std::vector&lt;ByteRange&gt; ticketSecrets{{s1-&gt;coalesce(), s2-&gt;coalesce()}};</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(cipher_.<a class="code" href="classfizz_1_1server_1_1AeadTicketCipher.html#a943b59044ccac0088228bf696e473ad2">setTicketSecrets</a>(<a class="code" href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">std::move</a>(ticketSecrets)));</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  }</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a294a70583c9f2b43a1c80d29036edf90">  102</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a294a70583c9f2b43a1c80d29036edf90">expectDecode</a>() {</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-spec-builders_8h.html#a535a6156de72c1a2e25a127e38ee5232">EXPECT_CALL</a>(codec_, _decode(<a class="code" href="namespacetesting.html#a4ba77a3f5b67166ff1b59d96a32346a2">_</a>, <a class="code" href="namespacetesting.html#a4ba77a3f5b67166ff1b59d96a32346a2">_</a>))</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        .WillOnce(</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;            <a class="code" href="namespacetesting.html#ac06a5d08441c2de733e4f917d3848478">Invoke</a>([](<a class="code" href="namespacefizz.html#af020f21a568ff86800e03d6ad2a9b84d">Buf</a>&amp; encoded, <span class="keyword">const</span> <a class="code" href="classfizz_1_1server_1_1FizzServerContext.html">FizzServerContext</a>* <span class="comment">/*context*/</span>) {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;              <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                  <a class="code" href="structfolly_1_1IOBufEqualTo.html">IOBufEqualTo</a>()(encoded, <a class="code" href="classfolly_1_1IOBuf.html#aa1c4b32cfaa7c96d591d8ad5f5f7b959">IOBuf::copyBuffer</a>(<span class="stringliteral">&quot;encodedticket&quot;</span>)));</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;              <span class="keywordflow">return</span> <a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a>();</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            }));</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a8953d280abc7258fb95b7c2eea655013">  112</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a8953d280abc7258fb95b7c2eea655013">checkUnsetEncrypt</a>() {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a> <a class="code" href="http__parser_8c.html#adc6e5733fc3c22f0a7b2914188c49c90">state</a>;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(cipher_.<a class="code" href="classfizz_1_1server_1_1AeadTicketCipher.html#a9ced7781d3e1faa9ede30c1bf7f3e194">encrypt</a>(<a class="code" href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">std::move</a>(state)).get().hasValue());</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  }</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;};</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#ac3363b9584f6e0f55f717841a4cee062">  118</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestEncryptNoTicketSecrets) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  checkUnsetEncrypt();</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a9751f3207ff9879ed65114bb3bd9a6af">  122</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestEncrypt) {</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <a class="code" href="namespacefizz_1_1test.html#a2264f410173634f45061ea7f4ecf8182">useMockRandom</a>();</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  cipher_.setValidity(std::chrono::seconds(5));</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-spec-builders_8h.html#a535a6156de72c1a2e25a127e38ee5232">EXPECT_CALL</a>(<a class="code" href="CompressionTest_8cpp.html#a3a8e55a3e3def7bbb4e6e1ca23b441e4">codec_</a>, _encode(<a class="code" href="namespacetesting.html#a4ba77a3f5b67166ff1b59d96a32346a2">_</a>)).WillOnce(<a class="code" href="namespacetesting.html#a27b14cbbb03620634372b762686d7f50">InvokeWithoutArgs</a>([]() {</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classfolly_1_1IOBuf.html#aa1c4b32cfaa7c96d591d8ad5f5f7b959">IOBuf::copyBuffer</a>(<span class="stringliteral">&quot;encodedticket&quot;</span>);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  }));</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <a class="code" href="structfizz_1_1server_1_1ResumptionState.html">ResumptionState</a> <a class="code" href="http__parser_8c.html#adc6e5733fc3c22f0a7b2914188c49c90">state</a>;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="keyword">auto</span> result = cipher_.encrypt(<a class="code" href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">std::move</a>(state)).get();</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(result.hasValue());</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(<a class="code" href="structfolly_1_1IOBufEqualTo.html">IOBufEqualTo</a>()(result-&gt;first, <a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#af82a5a07942b0d09d845c4505c368bc6">ticket1</a>)));</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result-&gt;second, std::chrono::seconds(5));</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;}</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#ad0b0d54e9a27b3e54faac7d1a8aa0170">  136</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptNoTicketSecrets) {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#af82a5a07942b0d09d845c4505c368bc6">ticket1</a>)).get();</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">PskType::Rejected</a>);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(result.second.hasValue());</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;}</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#ac9fe8e1d59901a9d50c6b25d42689036">  142</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptFirst) {</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  expectDecode();</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#af82a5a07942b0d09d845c4505c368bc6">ticket1</a>)).get();</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131a1b90141a36c2700b5ee94efc22355acd">PskType::Resumption</a>);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(result.second.hasValue());</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;}</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a5ce09750e40f6e512fadea0c5baabc45">  150</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptSecond) {</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  expectDecode();</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#ab308dca0c8a23fd3ccc4941097db4267">ticket3</a>)).get();</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131a1b90141a36c2700b5ee94efc22355acd">PskType::Resumption</a>);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(result.second.hasValue());</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;}</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#acda2a60374252c0663d0134a16f52f67">  158</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptWithContext) {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  setTicketSecrets(<span class="stringliteral">&quot;foobar&quot;</span>);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  expectDecode();</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#a8d096c8bac0c042faabc1aef89b0207d">ticket4</a>)).get();</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131a1b90141a36c2700b5ee94efc22355acd">PskType::Resumption</a>);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(result.second.hasValue());</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;}</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a6857d528ce6030fb8ea689758aff8ff9">  166</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptWithoutContext) {</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;  <span class="comment">// Ticket 4 needs context &#39;foobar&#39;</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#a8d096c8bac0c042faabc1aef89b0207d">ticket4</a>)).get();</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">PskType::Rejected</a>);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(result.second.hasValue());</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;}</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a17443a035d270ac4c3270af191789d35">  174</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptWithWrongContext) {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  setTicketSecrets(<span class="stringliteral">&quot;barbaz&quot;</span>);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;  <span class="comment">// barbaz =/= foobar</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#a8d096c8bac0c042faabc1aef89b0207d">ticket4</a>)).get();</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">PskType::Rejected</a>);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(result.second.hasValue());</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;}</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#aaa9b86348c65f87d4edc0f99b26cad51">  182</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptWithUnneededContext) {</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  setTicketSecrets(<span class="stringliteral">&quot;foobar&quot;</span>);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  <span class="comment">// Now test that ticket 3 with context &#39;foobar&#39; doesn&#39;t work</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#ab308dca0c8a23fd3ccc4941097db4267">ticket3</a>)).get();</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">PskType::Rejected</a>);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(result.second.hasValue());</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;}</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a015668e7ddcdd9fa6920ec44cdba7457">  190</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptSeqNum) {</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  expectDecode();</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#a824b473c301f043f1e39eb1ad2d40dd9">ticket2</a>)).get();</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131a1b90141a36c2700b5ee94efc22355acd">PskType::Resumption</a>);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(result.second.hasValue());</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;}</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#af914cbaa2b1513eebc13b925df36f48e">  198</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptFailed) {</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">toIOBuf</a>(<a class="code" href="AeadTicketCipherTest_8cpp.html#a5cfe695e2acca33b0687d53ff339920d">badTicket</a>)).get();</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">PskType::Rejected</a>);</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(result.second.hasValue());</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;}</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a1fb104992c67d3f217099e8c0c5e5209">  205</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestDecryptTooShort) {</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;  <span class="keyword">auto</span> result = cipher_.decrypt(<a class="code" href="classfolly_1_1IOBuf.html#aa1c4b32cfaa7c96d591d8ad5f5f7b959">IOBuf::copyBuffer</a>(<span class="stringliteral">&quot;short&quot;</span>)).get();</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a>(result.first, <a class="code" href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">PskType::Rejected</a>);</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(result.second.hasValue());</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;}</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#ace145c030de4ca46709044cf2fc45e75">  212</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestUnsetTicketSecrets) {</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;  setTicketSecrets();</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a>(cipher_.setTicketSecrets(std::vector&lt;ByteRange&gt;()));</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  checkUnsetEncrypt();</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;}</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="namespacefizz_1_1server_1_1test.html#a6e7a6b3dd28492bac342d41a1d1a1430">  218</a></span>&#160;<a class="code" href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">TEST_F</a>(<a class="code" href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">AeadTicketCipherTest</a>, TestSetTicketSecretsTooShort) {</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  <a class="code" href="classfolly_1_1Range.html">StringPiece</a> tooShort{<span class="stringliteral">&quot;short&quot;</span>};</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  std::vector&lt;ByteRange&gt; ticketSecrets{{tooShort}};</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;  <a class="code" href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a>(cipher_.setTicketSecrets(<a class="code" href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">std::move</a>(ticketSecrets)));</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  checkUnsetEncrypt();</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;}</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;} <span class="comment">// namespace test</span></div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;} <span class="comment">// namespace server</span></div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;} <span class="comment">// namespace fizz</span></div><div class="ttc" id="classfizz_1_1server_1_1test_1_1MockTicketCodec_html"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html">fizz::server::test::MockTicketCodec</a></div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00060">AeadTicketCipherTest.cpp:60</a></div></div>
<div class="ttc" id="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h_html_a6f76aeb56f492cfe538e177b6aa77965"><div class="ttname"><a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h.html#a6f76aeb56f492cfe538e177b6aa77965">MOCK_CONST_METHOD1</a></div><div class="ttdeci">#define MOCK_CONST_METHOD1(m,...)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h_source.html#l00688">gmock-generated-function-mockers.h:688</a></div></div>
<div class="ttc" id="namespacetesting_html"><div class="ttname"><a href="namespacetesting.html">testing</a></div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-actions_8h_source.html#l00053">gmock-actions.h:53</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html_a294a70583c9f2b43a1c80d29036edf90"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a294a70583c9f2b43a1c80d29036edf90">fizz::server::test::AeadTicketCipherTest::expectDecode</a></div><div class="ttdeci">void expectDecode()</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00102">AeadTicketCipherTest.cpp:102</a></div></div>
<div class="ttc" id="fizz_2fizz_2crypto_2test_2TestUtil_8h_html"><div class="ttname"><a href="fizz_2fizz_2crypto_2test_2TestUtil_8h.html">TestUtil.h</a></div></div>
<div class="ttc" id="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_html_a4159019abda84f5366acdb7604ff220a"><div class="ttname"><a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#a4159019abda84f5366acdb7604ff220a">EXPECT_EQ</a></div><div class="ttdeci">#define EXPECT_EQ(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_source.html#l01922">gtest.h:1922</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_aac60ced510e6c5b36db4b023142fe059"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#aac60ced510e6c5b36db4b023142fe059">ticketSecret1</a></div><div class="ttdeci">static constexpr StringPiece ticketSecret1</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00023">AeadTicketCipherTest.cpp:23</a></div></div>
<div class="ttc" id="namespacetest_html"><div class="ttname"><a href="namespacetest.html">test</a></div></div>
<div class="ttc" id="fizz_2build___2CMakeCache_8txt_html_a261f9f58ccbeaa962c4e675e4212c9cc"><div class="ttname"><a href="fizz_2build___2CMakeCache_8txt.html#a261f9f58ccbeaa962c4e675e4212c9cc">context</a></div><div class="ttdeci">context</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2CMakeCache_8txt_source.html#l00563">CMakeCache.txt:563</a></div></div>
<div class="ttc" id="namespacefolly_1_1gen_html_ac24ec252b1b738a40c274285527c193f"><div class="ttname"><a href="namespacefolly_1_1gen.html#ac24ec252b1b738a40c274285527c193f">folly::gen::move</a></div><div class="ttdeci">constexpr detail::Map&lt; Move &gt; move</div><div class="ttdef"><b>Definition:</b> <a href="Base-inl_8h_source.html#l02567">Base-inl.h:2567</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html_aa8204c7f7fddca5dd74dfb160291a4dc"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#aa8204c7f7fddca5dd74dfb160291a4dc">fizz::server::test::AeadTicketCipherTest::setTicketSecrets</a></div><div class="ttdeci">void setTicketSecrets(std::string pskContext=&quot;&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00090">AeadTicketCipherTest.cpp:90</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_a8d096c8bac0c042faabc1aef89b0207d"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#a8d096c8bac0c042faabc1aef89b0207d">ticket4</a></div><div class="ttdeci">static constexpr StringPiece ticket4</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00042">AeadTicketCipherTest.cpp:42</a></div></div>
<div class="ttc" id="classfizz_1_1OpenSSLEVPCipher_html"><div class="ttname"><a href="classfizz_1_1OpenSSLEVPCipher.html">fizz::OpenSSLEVPCipher</a></div><div class="ttdef"><b>Definition:</b> <a href="OpenSSLEVPCipher_8h_source.html#l00039">OpenSSLEVPCipher.h:39</a></div></div>
<div class="ttc" id="namespacefolly_html"><div class="ttname"><a href="namespacefolly.html">folly</a></div><div class="ttdoc">—— Concurrent Priority Queue Implementation —— </div><div class="ttdef"><b>Definition:</b> <a href="AtomicBitSet_8h_source.html#l00029">AtomicBitSet.h:29</a></div></div>
<div class="ttc" id="CompressionTest_8cpp_html_a3a8e55a3e3def7bbb4e6e1ca23b441e4"><div class="ttname"><a href="CompressionTest_8cpp.html#a3a8e55a3e3def7bbb4e6e1ca23b441e4">codec_</a></div><div class="ttdeci">std::unique_ptr&lt; Codec &gt; codec_</div><div class="ttdef"><b>Definition:</b> <a href="CompressionTest_8cpp_source.html#l01160">CompressionTest.cpp:1160</a></div></div>
<div class="ttc" id="namespacetesting_html_a27b14cbbb03620634372b762686d7f50"><div class="ttname"><a href="namespacetesting.html#a27b14cbbb03620634372b762686d7f50">testing::InvokeWithoutArgs</a></div><div class="ttdeci">PolymorphicAction&lt; internal::InvokeWithoutArgsAction&lt; FunctionImpl &gt; &gt; InvokeWithoutArgs(FunctionImpl function_impl)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-actions_8h_source.html#l01168">gmock-actions.h:1168</a></div></div>
<div class="ttc" id="structfolly_1_1IOBufEqualTo_html"><div class="ttname"><a href="structfolly_1_1IOBufEqualTo.html">folly::IOBufEqualTo</a></div><div class="ttdef"><b>Definition:</b> <a href="IOBuf_8h_source.html#l01549">IOBuf.h:1549</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html_a473ad5f2ca0ec020e2b9e4bcd107a308"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a473ad5f2ca0ec020e2b9e4bcd107a308">fizz::server::test::AeadTicketCipherTest::cipher_</a></div><div class="ttdeci">TestAeadTicketCipher cipher_</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00087">AeadTicketCipherTest.cpp:87</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance_html"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1MockTicketCodecInstance.html">fizz::server::test::MockTicketCodecInstance</a></div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00052">AeadTicketCipherTest.cpp:52</a></div></div>
<div class="ttc" id="namespacefizz_1_1test_html_a2264f410173634f45061ea7f4ecf8182"><div class="ttname"><a href="namespacefizz_1_1test.html#a2264f410173634f45061ea7f4ecf8182">fizz::test::useMockRandom</a></div><div class="ttdeci">void useMockRandom()</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2fizz_2crypto_2test_2TestUtil_8cpp_source.html#l00069">TestUtil.cpp:69</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html_ab2fd9451760c4e7446e7756b28a9fd5a"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#ab2fd9451760c4e7446e7756b28a9fd5a">fizz::server::test::AeadTicketCipherTest::codec_</a></div><div class="ttdeci">MockTicketCodecInstance codec_</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00088">AeadTicketCipherTest.cpp:88</a></div></div>
<div class="ttc" id="namespacefizz_1_1test_html_a19996dd626c1ca1d4460a6430b29c444"><div class="ttname"><a href="namespacefizz_1_1test.html#a19996dd626c1ca1d4460a6430b29c444">fizz::test::toIOBuf</a></div><div class="ttdeci">std::unique_ptr&lt; folly::IOBuf &gt; toIOBuf(std::string hexData, size_t headroom, size_t tailroom)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2fizz_2crypto_2aead_2test_2TestUtil_8cpp_source.html#l00024">TestUtil.cpp:24</a></div></div>
<div class="ttc" id="classtesting_1_1Test_html"><div class="ttname"><a href="classtesting_1_1Test.html">testing::Test</a></div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_source.html#l00371">gtest.h:371</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1AeadTicketCipher_html"><div class="ttname"><a href="classfizz_1_1server_1_1AeadTicketCipher.html">fizz::server::AeadTicketCipher</a></div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipher_8h_source.html#l00019">AeadTicketCipher.h:19</a></div></div>
<div class="ttc" id="fizz_2fizz_2crypto_2test_2Mocks_8h_html"><div class="ttname"><a href="fizz_2fizz_2crypto_2test_2Mocks_8h.html">Mocks.h</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_af82a5a07942b0d09d845c4505c368bc6"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#af82a5a07942b0d09d845c4505c368bc6">ticket1</a></div><div class="ttdeci">static constexpr StringPiece ticket1</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00028">AeadTicketCipherTest.cpp:28</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1AeadTicketCipher_html_a943b59044ccac0088228bf696e473ad2"><div class="ttname"><a href="classfizz_1_1server_1_1AeadTicketCipher.html#a943b59044ccac0088228bf696e473ad2">fizz::server::AeadTicketCipher::setTicketSecrets</a></div><div class="ttdeci">bool setTicketSecrets(const std::vector&lt; folly::ByteRange &gt; &amp;ticketSecrets)</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipher_8h_source.html#l00039">AeadTicketCipher.h:39</a></div></div>
<div class="ttc" id="namespacetesting_html_ac06a5d08441c2de733e4f917d3848478"><div class="ttname"><a href="namespacetesting.html#ac06a5d08441c2de733e4f917d3848478">testing::Invoke</a></div><div class="ttdeci">PolymorphicAction&lt; internal::InvokeAction&lt; FunctionImpl &gt; &gt; Invoke(FunctionImpl function_impl)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-more-actions_8h_source.html#l00114">gmock-more-actions.h:114</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1FizzServerContext_html"><div class="ttname"><a href="classfizz_1_1server_1_1FizzServerContext.html">fizz::server::FizzServerContext</a></div><div class="ttdef"><b>Definition:</b> <a href="FizzServerContext_8h_source.html#l00045">FizzServerContext.h:45</a></div></div>
<div class="ttc" id="namespacefizz_html"><div class="ttname"><a href="namespacefizz.html">fizz</a></div><div class="ttdef"><b>Definition:</b> <a href="client_2Actions_8h_source.html#l00016">Actions.h:16</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1AeadTicketCipher_html_a9ced7781d3e1faa9ede30c1bf7f3e194"><div class="ttname"><a href="classfizz_1_1server_1_1AeadTicketCipher.html#a9ced7781d3e1faa9ede30c1bf7f3e194">fizz::server::AeadTicketCipher::encrypt</a></div><div class="ttdeci">folly::Future&lt; folly::Optional&lt; std::pair&lt; Buf, std::chrono::seconds &gt; &gt; &gt; encrypt(ResumptionState resState) const override</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipher_8h_source.html#l00051">AeadTicketCipher.h:51</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1MockTicketCodec_html_a27eba9fd779054f5394ad8f6db29d673"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a27eba9fd779054f5394ad8f6db29d673">fizz::server::test::MockTicketCodec::encode</a></div><div class="ttdeci">static Buf encode(ResumptionState state)</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00063">AeadTicketCipherTest.cpp:63</a></div></div>
<div class="ttc" id="classfolly_1_1Range_html"><div class="ttname"><a href="classfolly_1_1Range.html">folly::Range&lt; const char * &gt;</a></div></div>
<div class="ttc" id="namespacefizz_html_ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699"><div class="ttname"><a href="namespacefizz.html#ab017b61ecd944032c374d31740161131ad37b1f6c0512e2118cee17fea015b699">fizz::PskType::Rejected</a></div></div>
<div class="ttc" id="namespacefizz_1_1test_html"><div class="ttname"><a href="namespacefizz_1_1test.html">fizz::test</a></div><div class="ttdef"><b>Definition:</b> <a href="IOBufUtilTest_8cpp_source.html#l00017">IOBufUtilTest.cpp:17</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html">fizz::server::test::AeadTicketCipherTest</a></div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00079">AeadTicketCipherTest.cpp:79</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1MockTicketCodec_html_a7838c130b62e0ceacfbca4f0d36be548"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a7838c130b62e0ceacfbca4f0d36be548">fizz::server::test::MockTicketCodec::instance</a></div><div class="ttdeci">static MockTicketCodecInstance * instance</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00069">AeadTicketCipherTest.cpp:69</a></div></div>
<div class="ttc" id="namespacefizz_html_ab017b61ecd944032c374d31740161131a1b90141a36c2700b5ee94efc22355acd"><div class="ttname"><a href="namespacefizz.html#ab017b61ecd944032c374d31740161131a1b90141a36c2700b5ee94efc22355acd">fizz::PskType::Resumption</a></div></div>
<div class="ttc" id="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_html_ac33e7cdfb5d44a7a0f0ab552eb5c3c6a"><div class="ttname"><a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#ac33e7cdfb5d44a7a0f0ab552eb5c3c6a">EXPECT_TRUE</a></div><div class="ttdeci">#define EXPECT_TRUE(condition)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_source.html#l01859">gtest.h:1859</a></div></div>
<div class="ttc" id="classfizz_1_1HkdfImpl_html"><div class="ttname"><a href="classfizz_1_1HkdfImpl.html">fizz::HkdfImpl</a></div><div class="ttdef"><b>Definition:</b> <a href="Hkdf_8h_source.html#l00054">Hkdf.h:54</a></div></div>
<div class="ttc" id="namespacefizz_1_1test_html_a6a9ffcbf42018f6c4248ff8be15c3bee"><div class="ttname"><a href="namespacefizz_1_1test.html#a6a9ffcbf42018f6c4248ff8be15c3bee">fizz::test::TEST_F</a></div><div class="ttdeci">TEST_F(RSAPSSTest, TestSignVerify)</div><div class="ttdef"><b>Definition:</b> <a href="RSAPSSSignatureTest_8cpp_source.html#l00038">RSAPSSSignatureTest.cpp:38</a></div></div>
<div class="ttc" id="Conv_8cpp_html_ae1adbce218e7a9d09164012443191d24"><div class="ttname"><a href="Conv_8cpp.html#ae1adbce218e7a9d09164012443191d24">string</a></div><div class="ttdeci">const char * string</div><div class="ttdef"><b>Definition:</b> <a href="Conv_8cpp_source.html#l00212">Conv.cpp:212</a></div></div>
<div class="ttc" id="namespacefizz_html_af020f21a568ff86800e03d6ad2a9b84d"><div class="ttname"><a href="namespacefizz.html#af020f21a568ff86800e03d6ad2a9b84d">fizz::Buf</a></div><div class="ttdeci">std::unique_ptr&lt; folly::IOBuf &gt; Buf</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2fizz_2record_2Types_8h_source.html#l00022">Types.h:22</a></div></div>
<div class="ttc" id="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h_html_a31c489715704817a3f40d178404c61e8"><div class="ttname"><a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h.html#a31c489715704817a3f40d178404c61e8">MOCK_CONST_METHOD2</a></div><div class="ttdeci">#define MOCK_CONST_METHOD2(m,...)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-generated-function-mockers_8h_source.html#l00689">gmock-generated-function-mockers.h:689</a></div></div>
<div class="ttc" id="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-spec-builders_8h_html_a535a6156de72c1a2e25a127e38ee5232"><div class="ttname"><a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-spec-builders_8h.html#a535a6156de72c1a2e25a127e38ee5232">EXPECT_CALL</a></div><div class="ttdeci">#define EXPECT_CALL(obj, call)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-spec-builders_8h_source.html#l01845">gmock-spec-builders.h:1845</a></div></div>
<div class="ttc" id="namespacetesting_html_a4ba77a3f5b67166ff1b59d96a32346a2"><div class="ttname"><a href="namespacetesting.html#a4ba77a3f5b67166ff1b59d96a32346a2">testing::_</a></div><div class="ttdeci">const internal::AnythingMatcher _</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googlemock_2include_2gmock_2gmock-matchers_8h_source.html#l03729">gmock-matchers.h:3729</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html_a8953d280abc7258fb95b7c2eea655013"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a8953d280abc7258fb95b7c2eea655013">fizz::server::test::AeadTicketCipherTest::checkUnsetEncrypt</a></div><div class="ttdeci">void checkUnsetEncrypt()</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00112">AeadTicketCipherTest.cpp:112</a></div></div>
<div class="ttc" id="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_html_aeb6c7ae89f440c90c1a1815951c836da"><div class="ttname"><a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h.html#aeb6c7ae89f440c90c1a1815951c836da">EXPECT_FALSE</a></div><div class="ttdeci">#define EXPECT_FALSE(condition)</div><div class="ttdef"><b>Definition:</b> <a href="fizz_2build___2gtest_2src_2gtest_2googletest_2include_2gtest_2gtest_8h_source.html#l01862">gtest.h:1862</a></div></div>
<div class="ttc" id="AeadTicketCipher_8h_html"><div class="ttname"><a href="AeadTicketCipher_8h.html">AeadTicketCipher.h</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_a5cfe695e2acca33b0687d53ff339920d"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#a5cfe695e2acca33b0687d53ff339920d">badTicket</a></div><div class="ttdeci">static constexpr StringPiece badTicket</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00045">AeadTicketCipherTest.cpp:45</a></div></div>
<div class="ttc" id="classfolly_1_1IOBuf_html_aa1c4b32cfaa7c96d591d8ad5f5f7b959"><div class="ttname"><a href="classfolly_1_1IOBuf.html#aa1c4b32cfaa7c96d591d8ad5f5f7b959">folly::IOBuf::copyBuffer</a></div><div class="ttdeci">static std::unique_ptr&lt; IOBuf &gt; copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)</div><div class="ttdef"><b>Definition:</b> <a href="IOBuf_8h_source.html#l01587">IOBuf.h:1587</a></div></div>
<div class="ttc" id="namespacefizz_1_1server_1_1test_html_abe75a97e6be16b3f0ae585e8171529bb"><div class="ttname"><a href="namespacefizz_1_1server_1_1test.html#abe75a97e6be16b3f0ae585e8171529bb">fizz::server::test::TestAeadTicketCipher</a></div><div class="ttdeci">AeadTicketCipher&lt; OpenSSLEVPCipher&lt; AESGCM128 &gt;, MockTicketCodec, HkdfImpl&lt; Sha256 &gt;&gt; TestAeadTicketCipher</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00077">AeadTicketCipherTest.cpp:77</a></div></div>
<div class="ttc" id="fizz_2fizz_2crypto_2aead_2test_2Mocks_8h_html"><div class="ttname"><a href="fizz_2fizz_2crypto_2aead_2test_2Mocks_8h.html">Mocks.h</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_a824b473c301f043f1e39eb1ad2d40dd9"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#a824b473c301f043f1e39eb1ad2d40dd9">ticket2</a></div><div class="ttdeci">static constexpr StringPiece ticket2</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00030">AeadTicketCipherTest.cpp:30</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_ab308dca0c8a23fd3ccc4941097db4267"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#ab308dca0c8a23fd3ccc4941097db4267">ticket3</a></div><div class="ttdeci">static constexpr StringPiece ticket3</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00038">AeadTicketCipherTest.cpp:38</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1MockTicketCodec_html_a7883e90f8814089caaf468a2fedc4cf9"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1MockTicketCodec.html#a7883e90f8814089caaf468a2fedc4cf9">fizz::server::test::MockTicketCodec::decode</a></div><div class="ttdeci">static ResumptionState decode(Buf encoded, const FizzServerContext *context)</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00066">AeadTicketCipherTest.cpp:66</a></div></div>
<div class="ttc" id="structfizz_1_1server_1_1ResumptionState_html"><div class="ttname"><a href="structfizz_1_1server_1_1ResumptionState.html">fizz::server::ResumptionState</a></div><div class="ttdef"><b>Definition:</b> <a href="ResumptionState_8h_source.html#l00019">ResumptionState.h:19</a></div></div>
<div class="ttc" id="String_8h_html"><div class="ttname"><a href="String_8h.html">String.h</a></div></div>
<div class="ttc" id="http__parser_8c_html_adc6e5733fc3c22f0a7b2914188c49c90"><div class="ttname"><a href="http__parser_8c.html#adc6e5733fc3c22f0a7b2914188c49c90">state</a></div><div class="ttdeci">state</div><div class="ttdef"><b>Definition:</b> <a href="http__parser_8c_source.html#l00272">http_parser.c:272</a></div></div>
<div class="ttc" id="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest_html_a85180d3e315fa556530e744c5aa365b7"><div class="ttname"><a href="classfizz_1_1server_1_1test_1_1AeadTicketCipherTest.html#a85180d3e315fa556530e744c5aa365b7">fizz::server::test::AeadTicketCipherTest::SetUp</a></div><div class="ttdeci">void SetUp() override</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00082">AeadTicketCipherTest.cpp:82</a></div></div>
<div class="ttc" id="AeadTicketCipherTest_8cpp_html_a4bea7eb0d48ce97ed7bd5a54d9d55205"><div class="ttname"><a href="AeadTicketCipherTest_8cpp.html#a4bea7eb0d48ce97ed7bd5a54d9d55205">ticketSecret2</a></div><div class="ttdeci">static constexpr StringPiece ticketSecret2</div><div class="ttdef"><b>Definition:</b> <a href="AeadTicketCipherTest_8cpp_source.html#l00033">AeadTicketCipherTest.cpp:33</a></div></div>
</div><!-- fragment --></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="dir_d333e33cf903653326082c1f32e03be5.html">proxygen</a></li><li class="navelem"><a class="el" href="dir_f44f3e2eff80cd1e96adc6e9902c5531.html">fizz</a></li><li class="navelem"><a class="el" href="dir_73dd12fbefdf3f26351a705d68b81fa0.html">fizz</a></li><li class="navelem"><a class="el" href="dir_4848a803a94d1fd0061a62969d4c8c12.html">server</a></li><li class="navelem"><a class="el" href="dir_3aaf0caac74ebd7b49085b64e86a408d.html">test</a></li><li class="navelem"><a class="el" href="AeadTicketCipherTest_8cpp.html">AeadTicketCipherTest.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>