⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsaprivatekey.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_02) on Wed Mar 22 19:19:09 PST 2006 --><TITLE>DSAPrivateKey (Java Card API and Subsets)</TITLE><META NAME="keywords" CONTENT="javacard.security.DSAPrivateKey interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="DSAPrivateKey (Java Card API and Subsets)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DSAPrivateKey.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">&nbsp;<A HREF="../../javacard/security/DSAKey.html" title="interface in javacard.security"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javacard/security/DSAPublicKey.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/DSAPrivateKey.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="DSAPrivateKey.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javacard.security</FONT><BR>Interface DSAPrivateKey</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../javacard/security/DSAKey.html" title="interface in javacard.security">DSAKey</A>, <A HREF="../../javacard/security/Key.html" title="interface in javacard.security">Key</A>, <A HREF="../../javacard/security/PrivateKey.html" title="interface in javacard.security">PrivateKey</A></DD></DL><HR><DL><DT><PRE>public interface <B>DSAPrivateKey</B><DT>extends <A HREF="../../javacard/security/PrivateKey.html" title="interface in javacard.security">PrivateKey</A>, <A HREF="../../javacard/security/DSAKey.html" title="interface in javacard.security">DSAKey</A></DL></PRE><P>The <code>DSAPrivateKey</code> interface is used to sign data using the DSA algorithm. An implementation of <code>DSAPrivateKey</code> interface must also implement the <code>DSAKey</code> interface methods. <p>When all four components of the key (X,P,Q,G) are set, the key is initialized and ready for use. <p><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../javacard/security/DSAPublicKey.html" title="interface in javacard.security"><CODE>DSAPublicKey</CODE></A>, <A HREF="../../javacard/security/KeyBuilder.html" title="class in javacard.security"><CODE>KeyBuilder</CODE></A>, <A HREF="../../javacard/security/Signature.html" title="class in javacard.security"><CODE>Signature</CODE></A>, <A HREF="../../javacardx/crypto/KeyEncryption.html" title="interface in javacardx.crypto"><CODE>javacardx.crypto.KeyEncryption</CODE></A></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/DSAPrivateKey.html#getX(byte[], short)">getX</A></B>(byte[]&nbsp;buffer,     short&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the key in plain text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/DSAPrivateKey.html#setX(byte[], short, short)">setX</A></B>(byte[]&nbsp;buffer,     short&nbsp;offset,     short&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the key.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javacard.security.Key"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from interface javacard.security.<A HREF="../../javacard/security/Key.html" title="interface in javacard.security">Key</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javacard/security/Key.html#clearKey()">clearKey</A>, <A HREF="../../javacard/security/Key.html#getSize()">getSize</A>, <A HREF="../../javacard/security/Key.html#getType()">getType</A>, <A HREF="../../javacard/security/Key.html#isInitialized()">isInitialized</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javacard.security.DSAKey"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from interface javacard.security.<A HREF="../../javacard/security/DSAKey.html" title="interface in javacard.security">DSAKey</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javacard/security/DSAKey.html#getG(byte[], short)">getG</A>, <A HREF="../../javacard/security/DSAKey.html#getP(byte[], short)">getP</A>, <A HREF="../../javacard/security/DSAKey.html#getQ(byte[], short)">getQ</A>, <A HREF="../../javacard/security/DSAKey.html#setG(byte[], short, short)">setG</A>, <A HREF="../../javacard/security/DSAKey.html#setP(byte[], short, short)">setP</A>, <A HREF="../../javacard/security/DSAKey.html#setQ(byte[], short, short)">setQ</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="setX(byte[], short, short)"><!-- --></A><H3>setX</H3><PRE>void <B>setX</B>(byte[]&nbsp;buffer,          short&nbsp;offset,          short&nbsp;length)          throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Sets the value of the key. When the base, prime and subprime parameters are initialized and the key value is set, the key is ready for use. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input key 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 key 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 key data length is inconsistent with the implementation or if input data decryption is required and fails. </ul></DL></DD></DL><HR><A NAME="getX(byte[], short)"><!-- --></A><H3>getX</H3><PRE>short <B>getX</B>(byte[]&nbsp;buffer,           short&nbsp;offset)</PRE><DL><DD>Returns the 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 key value starts<DT><B>Returns:</B><DD>the byte length of the key 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 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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DSAPrivateKey.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">&nbsp;<A HREF="../../javacard/security/DSAKey.html" title="interface in javacard.security"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javacard/security/DSAPublicKey.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/DSAPrivateKey.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="DSAPrivateKey.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &#169; 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 + -