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_EncryptInit_PrivateKey</TITLE> 16 <LINK rel="stylesheet" href="../../css/nitro.css"> 17 <BASE target="main"> 18</HEAD> 19<BODY> 20<H1>CRYPTO_RSA_EncryptInit_PrivateKey <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_EncryptInit_PrivateKey(<a href="CRYPTORSAContext.html">CRYPTORSAContext</a> *context, <a href="CRYPTORSAEncryptInitPKParam.html">CRYPTORSAEncryptInitPKParam</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%"><SPAN class="argument">context</SPAN></TD> 38 <TD width="75%">Address of the context structure for internal use.</TD> 39 </TR> 40 <TR> 41 <TD><SPAN class="argument">param</SPAN></TD> 42 <TD>Address of the structure for specifying the required settings 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%">0</TD> 55 <TD width="75%">Initialization succeeded</TD> 56 </TR> 57 <TR> 58 <TD>-1</TD> 59 <TD>Initialization failed</TD> 60 </TR> 61 </TBODY> 62</TABLE> 63 64<H2>Description</H2> 65<P> 66 Performs initialization for encryption using the RSA algorithm. 67</P> 68<P> 69 This function is different from <A href="CRYPTO_RSA_EncryptInit.html"><CODE>CRYPTO_RSA_EncryptInit</CODE></A> because it allows you to initialize using a private key. 70</P> 71<P> 72 The ASN.1 format private key used by the CRYPTO library uses specifications that include the content of the public key. It is therefore possible to encrypt using the public key included in private key data. This function encrypts data using a public key included in this private key. 73</P> 74 75<H2>See Also</H2> 76<P> 77 <A href="CRYPTO_RSA_EncryptInit.html"><CODE>CRYPTO_RSA_EncryptInit</CODE></A> 78</P> 79 80<H2>Revision History</H2> 81<P> 82 2008/11/17 Revised <B>Description</B>.<BR> 2008/04/17 Initial version. 83</P> 84 85<hr><p>CONFIDENTIAL</p></body> 86</HTML> 87