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>VerifySaveDataSecureValue</title>
8  </head>
9  <body>
10    <h1><CODE><a href="../../nn/Overview.html">nn</a>::<a href="../../nn/fs/Overview.html">fs</a>::VerifySaveDataSecureValue</CODE> Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14bool VerifySaveDataSecureValue(
15     <a href="../../nn_types/bit64.html">bit64</a> value,
16     <a href="../../nn_types/bit64.html">bit64</a> mask
17);
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>in</td>
32          <th>value</th>
33<td>The secure value to compare.</td>
34        </tr>
35        <tr>
36          <td>in</td>
37          <th>mask</th>
38<td>The mask for the secure value.</td>
39        </tr> </table>
40    </div>
41    <h2>Return Values</h2>
42<div class="section">Compares the value saved by the <CODE><a href="../../nn/fs/SetSaveDataSecureValue.html">SetSaveDataSecureValue</a></CODE> function with the value specified for <SPAN class="argument">value</SPAN> and returns <CODE>true</CODE> if the values are the same. If the values are different, the function returns <CODE>false</CODE>. </div>
43    <h2>Description</h2>
44    <div class="section">
45      <p>Performs comparison with application-linked 64-bit value.</p><p>For download applications, gets the 64-bit value from the save region in CRT system memory that was written there by the <CODE><a href="../../nn/fs/SetSaveDataSecureValue.html">SetSaveDataSecureValue</a></CODE> function, and compares this with <SPAN class="argument">value</SPAN>. No comparison is made on bits that are not set in the <SPAN class="argument">mask</SPAN> argument. The save region is unique to the application that called this function, so the same application always references the same save region.</p><p>If this function is called with the factory defaults or immediately after initializing the system, the values in the internal memory are treated as <CODE>0</CODE> for processing. Immediately after these initializations occur, the save data for the download application should be in an uninitialized state. If the save data is not initialized, do not make the assumption that the internal memory values are <CODE>0</CODE>. Even when you have not performed any processing that corresponds to <CODE>SetSaveDataSecureValue(0)</CODE>, such as downloading an application again, it is possible that the save data is in an uninitialized state. In short, do not call this function if the save data has not been initialized.</p><p>If the physical memory chips for a system were replaced to repair damage, or the system experienced corrupted internal memory data, the values in the internal memory are treated as <CODE>0</CODE> for processing, the same as for factory defaults. In these cases, because this function is called when the value is not <CODE>0</CODE>, the function returns <CODE>FALSE</CODE>. In other words, the passed value is not valid. If you cannot allow save data to become unusable because of repairs of damage to the internal memory, call the <a href="../../nn/fs/VerifySaveDataSecureValueLoosely.html"><CODE>VerifySaveDataSecureValueLoosely</CODE></a> function instead.</p><p>When this function is called from a card application, it always returns <CODE>TRUE</CODE>.</p><!-- write here --></div>
46    <h2>Revision History</h2>
47    <div class="section">
48      <dl class="history">
49        <dt>2012/06/15</dt>
50<dd>Added a description for the case when internal memory is damaged.<br />
51        </dd>
52        <dt>2012/04/26</dt>
53        <dd>Initial version.<br />
54        </dd>
55      </dl>
56    </div>
57  <hr><p>CONFIDENTIAL</p></body>
58</html>