1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>NWC24SetDlPublicKey</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<LINK rel="stylesheet" type="text/css" href="../nwc24.css">
9</HEAD>
10<BODY>
11<H1>NWC24SetDlSecretKey</H1>
12
13<H2>C Specification</H2>
14<DL>
15<DD><PRE><CODE>#include &lt;revolution/nwc24.h&gt;</CODE></PRE>
16<DD><PRE><CODE>#define NWC24_DL_SECRETKEY_LENGTH               (128 / 8)
17
18<A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24SetDlSecretKey( const <A HREF="../Types/NWC24DlTask.html">NWC24DlTask</A>* <VAR>taskPublic</VAR>, const u8 <VAR>secretKey[NWC24_DL_SECRETKEY_LENGTH]</VAR> );</CODE></PRE>
19</DL>
20
21<H2>Description</H2>
22<P class="obsoleted">
23This function is retained for compatibility. From now on you should use <A href="NWC24SetDlKeys.html"><CODE>NWC24SetDlKeys</CODE></A>.
24</P>
25<P>
26Sets the shared secret key for content decryption.<BR>
27</P>
28<P>
29Calling this function is not sufficient for using the specified public key. You also need to call <A href="NWC24SetDlFlags.html"><CODE>NWC24SetDlFlags()</CODE></A> to enable the application's public key.
30</P>
31
32<H2>Arguments</H2>
33<TABLE border="1" cellpadding="3" cellspacing="0.1" class="argument">
34  <TR>
35<TD class="name"><code><VAR>taskPublic</VAR></code></TD>
36    <TD class="description">
37Pointer to the download task.
38    </TD>
39  </TR>
40  <TR>
41<TD class="name"><code><VAR>secretKey</VAR></code></TD>
42    <TD class="description">
43Shared secret key.
44    </TD>
45  </TR>
46</TABLE>
47
48<h2>Return Values</h2>
49<P>
50<code>NWC24_OK</code>: Ended normally.<BR> <code>NWC24_ERR_LIB_NOT_OPENED</code>: The library has not been opened.<BR> <code>NWC24_ERR_PROTECTED</code>: Could not write the download task.<BR> <code>NWC24_ERR_INVALID_VALUE</code>: The value of either <code><VAR>taskPublic</VAR></code> or <code><VAR>publicKey</VAR></code> is NULL, or the download task is invalid<BR> <code>NWC24_ERR_FILE_*</code>: Error relating to internal file operations.<BR> <code>NWC24_ERR_FATAL</code>: A fatal error has occurred.<BR>
51</P>
52
53<H2>See Also</H2>
54<P>
55</P>
56
57<H2>Revision History</H2>
58<P>
592007/08/28 Added mention that use of this function is not recommended.<BR>2007/06/06 Initial version.
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</HTML>