📄 rsaprivatekey.html
字号:
<B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="setModulus(byte[], short, short)"><!-- --></A><H3>setModulus</H3><PRE>void <B>setModulus</B>(byte[] buffer, short offset, short length) throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Sets the modulus value of the key. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input modulus data is copied into the internal representation. <p>Note:<ul> <li><em>If the key object implements the </em><code>javacardx.crypto.KeyEncryption</code><em> interface and the </em><code>Cipher</code><em> object specified via </em><code>setKeyCipher()</code><em> is not </em><code>null</code><em>, the modulus value is decrypted using the </em><code>Cipher</code><em> object.</em> </ul><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the input buffer<DD><CODE>offset</CODE> - the offset into the input buffer at which the modulus value begins<DD><CODE>length</CODE> - the length of the modulus<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason code:<ul> <li><code>CryptoException.ILLEGAL_VALUE</code> if the input modulus data length is inconsistent with the implementation or if input data decryption is required and fails. </ul></DL></DD></DL><HR><A NAME="setExponent(byte[], short, short)"><!-- --></A><H3>setExponent</H3><PRE>void <B>setExponent</B>(byte[] buffer, short offset, short length) throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Sets the private exponent value of the key. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input exponent data is copied into the internal representation. <p>Note:<ul> <li><em>If the key object implements the </em><code>javacardx.crypto.KeyEncryption</code><em> interface and the </em><code>Cipher</code><em> object specified via </em><code>setKeyCipher()</code><em> is not </em><code>null</code><em>, the exponent value is decrypted using the </em><code>Cipher</code><em> object.</em> </ul><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the input buffer<DD><CODE>offset</CODE> - the offset into the input buffer at which the exponent value begins<DD><CODE>length</CODE> - the length of the exponent<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason code:<ul> <li><code>CryptoException.ILLEGAL_VALUE</code> if the input exponent data length is inconsistent with the implementation or if input data decryption is required and fails. </ul></DL></DD></DL><HR><A NAME="getModulus(byte[], short)"><!-- --></A><H3>getModulus</H3><PRE>short <B>getModulus</B>(byte[] buffer, short offset)</PRE><DL><DD>Returns the modulus value of the key in plain text. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the output buffer<DD><CODE>offset</CODE> - the offset into the output buffer at which the modulus value starts<DT><B>Returns:</B><DD>the byte length of the modulus value returned<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason code:<ul> <li><code>CryptoException.UNINITIALIZED_KEY</code> if the modulus value of the key has not been successfully initialized since the time the initialized state of the key was set to false. </ul><DT><B>See Also:</B><DD><A HREF="../../javacard/security/Key.html" title="interface in javacard.security"><CODE>Key</CODE></A></DL></DD></DL><HR><A NAME="getExponent(byte[], short)"><!-- --></A><H3>getExponent</H3><PRE>short <B>getExponent</B>(byte[] buffer, short offset)</PRE><DL><DD>Returns the private exponent value of the key in plain text. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the output buffer<DD><CODE>offset</CODE> - the offset into the output buffer at which the exponent value begins<DT><B>Returns:</B><DD>the byte length of the private exponent value returned<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason code:<ul> <li><code>CryptoException.UNINITIALIZED_KEY</code> if the private exponent value of the key has not been successfully initialized since the time the initialized state of the key was set to false. </ul><DT><B>See Also:</B><DD><A HREF="../../javacard/security/Key.html" title="interface in javacard.security"><CODE>Key</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RSAPrivateKey.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java Card </b><br><font size="-1">v2.2.2</font></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javacard/security/RSAPrivateCrtKey.html" title="interface in javacard.security"><B>PREV CLASS</B></A> <A HREF="../../javacard/security/RSAPublicKey.html" title="interface in javacard.security"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javacard/security/RSAPrivateKey.html" target="_top"><B>FRAMES</B></A> <A HREF="RSAPrivateKey.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 1993-2005 Sun Microsystems, Inc. 4150 Network Circle,<br>Santa Clara, CA, 95054, U.S.A. All Rights Reserved.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -