1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<!--========================================================================== 3 Copyright 2008 Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 ==========================================================================--> 11<HTML> 12<HEAD> 13 <META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 14 <META http-equiv="Content-Style-Type" content="text/css"> 15 <TITLE>CRYPTO_RSA_Decrypt</TITLE> 16 <LINK rel="stylesheet" href="../../css/nitro.css"> 17 <BASE target="main"> 18</HEAD> 19<BODY> 20<H1>CRYPTO_RSA_Decrypt <IMG src="../../image/BPT.gif" width="23" height="12" border="0" align="middle"><IMG src="../../image/TWL.gif" width="23" height="12" border="0" align="middle"></H1> 21 22<H2>Syntax</H2> 23<DL> 24 <DD> 25 <PRE><CODE> 26#include <nitro/crypto.h> 27 28s32 CRYPTO_RSA_Decrypt(<a href="CRYPTORSAContext.html">CRYPTORSAContext</a> *context, <a href="CRYPTORSADecryptParam.html">CRYPTORSADecryptParam</a> *param); 29 </CODE></PRE> 30 </DD> 31</DL> 32 33<H2>Arguments</H2> 34<TABLE border="1"> 35 <TBODY> 36 <TR> 37 <TD width="25%"><EM><STRONG><CODE>context</CODE></STRONG></EM></TD> 38 <TD width="75%">Specifies the address of the <code>CRYPTORSAContext</code> structure that was initialized by the <code><a href="CRYPTO_RSA_DecryptInit.html">CRYPTO_RSA_DecryptInit</a></code> function.</TD> 39 </TR> 40 <TR> 41 <TD><EM><STRONG><CODE>param</CODE></STRONG></EM></TD> 42 <TD>Specifies the address of the structure for specifying strings and other data for RSA encryption.</TD> 43 </TR> 44 </TBODY> 45</TABLE> 46 47<H2>Return Values</H2> 48<P> 49 Returns one of the following process results. 50</P> 51<TABLE border="1"> 52 <TBODY> 53 <TR> 54 <TD width="25%"><EM><STRONG><CODE>Positive number</CODE></STRONG></EM></TD> 55 <TD width="75%">Number of strings that were written to the output buffer (indicates that the decryption succeeded).</TD> 56 </TR> 57 <TR> 58 <TD><EM><STRONG><CODE>-1</CODE></STRONG></EM></TD> 59 <TD>Indicates that encryption failed.</TD> 60 </TR> 61 </TBODY> 62</TABLE> 63 64<H2>Description</H2> 65<P> 66 Performs decryption using the RSA algorithm. <BR> 67 The <code><a href="CRYPTO_RSA_DecryptInit.html">CRYPTO_RSA_DecryptInit</a></code> function must be run before running cryptography operations with this function. In addition, the <code><a href="CRYPTO_RSA_DecryptTerminate.html">CRYPTO_RSA_DecryptTerminate</a></code> function must be run when cryptography operations have completed. 68</P> 69<P> 70 The information required for decryption, such as the string to be decrypted and the output destination, must be specified in the members of the <CODE><STRONG><EM>param </EM></STRONG></CODE> argument. For details, refer to <a href="CRYPTORSADecryptParam.html">CRYPTORSADecryptParam</a>. 71</P> 72<P> 73 For detailed information on RSA encryption, see <A href="../overview/about_RSA.html">RSA Encryption Overview</A>. 74</P> 75 76<H2>See Also</H2> 77<P> 78 <CODE> 79 <A href="CRYPTO_RSA_DecryptInit.html">CRYPTO_RSA_DecryptInit</A>, <A href="CRYPTO_RSA_DecryptTerminate.html">CRYPTO_RSA_DecryptTerminate</A> 80 </CODE> 81</P> 82 83<H2>Revision History</H2> 84<P> 85 2008/04/02 Changed the return values (when successful, the function now returns the number of strings that were output).<BR> 86 2008/03/27 Initial version. 87</P> 88 89<hr><p>CONFIDENTIAL</p></body> 90</HTML> 91