1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <title>UpdateCdataFinal</title>
8  </head>
9  <body>
10    <h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/crypto/Overview.html">crypto</a>::<a href="../../../nn/crypto/AuthenticatedDecryptor/Overview.html">AuthenticatedDecryptor</a>::UpdateCdataFinal</CODE> Member Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14virtual size_t UpdateCdataFinal(
15     void * pDst,
16     size_t size
17) = 0;
18</pre>
19    </div>
20    <h2>Parameters</h2>
21    <div class="section">
22      <table class="arguments">
23        <thead>
24          <tr>
25            <td width="15" />
26            <th>Name</th>
27            <td>Description</td>
28          </tr>
29        </thead>
30        <tr>
31          <td>out</td>
32          <th>pDst</th>
33          <td>Pointer to the buffer storing the decryption results.</td>
34        </tr>
35        <tr>
36          <td>in</td>
37          <th>size</th>
38          <td>Size of the buffer specified by <SPAN class="argument">pDst</SPAN>.</td>
39        </tr> </table>
40    </div>
41    <h2>Return Values</h2>
42    <div class="section">Returns the number of bytes written to <SPAN class="argument">pDst</SPAN>. </div>
43    <h2>Description</h2>
44    <div class="section">
45      <p>Finalizes Cdata specification.</p><p>You must call this function after using the <CODE><a href="../../../nn/crypto/AuthenticatedDecryptor/UpdateCdata.html">UpdateCdata</a></CODE> function to finalize Cdata specification, and before calling the <CODE><a href="../../../nn/crypto/AuthenticatedDecryptor/GenerateMac.html">GenerateMac</a></CODE> function.</p><p>If there is no Cdata specification , do not call the <CODE><a href="../../../nn/crypto/AuthenticatedDecryptor/UpdateCdata.html">UpdateCdata</a></CODE> function. Instead, just call the <CODE><a href="../../../nn/crypto/AuthenticatedDecryptor/UpdateCdataFinal.html">UpdateCdataFinal</a></CODE> function.</p><p>The size of the buffer required for <SPAN class="argument">pDst</SPAN> is (the total of all <SPAN class="argument">size</SPAN> values specified in the <CODE>UpdateCdata</CODE> function calls) - (the total of all <CODE>UpdateCdata</CODE> function return values).</p><p>The function fails and displays an error if the size of the return value is larger than the buffer size specified in <SPAN class="argument">dstSize</SPAN>. Data is not written to the buffer beyond the size specified in <SPAN class="argument">dstSize</SPAN>. If the size of the return value is not larger than <SPAN class="argument">dstSize</SPAN>, the function indicates a successful completion and writes the size of the return value in <SPAN class="argument">pDst</SPAN>.</p><p>If this function fails, decryption cannot continue. You must then try again, starting by calling the <CODE><a href="../../../nn/ac/CTR/Initialize.html">Initialize</a></CODE> function.</p><!-- write here --></div>
46    <h2>Revision History</h2>
47    <div class="section">
48      <dl class="history">
49        <dt>2011/10/27</dt>
50        <dd>Initial version.<br />
51        </dd>
52      </dl>
53    </div>
54  <hr><p>CONFIDENTIAL</p></body>
55</html>