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

📄 keyagreement.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="ALG_EC_SVDP_DH"><!-- --></A><H3>ALG_EC_SVDP_DH</H3><PRE>public static final byte <B>ALG_EC_SVDP_DH</B></PRE><DL><DD>Elliptic curve secret value derivation primitive, Diffie-Hellman version, as per [IEEE P1363].<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javacard.security.KeyAgreement.ALG_EC_SVDP_DH">Constant Field Values</A></DL></DL><HR><A NAME="ALG_EC_SVDP_DHC"><!-- --></A><H3>ALG_EC_SVDP_DHC</H3><PRE>public static final byte <B>ALG_EC_SVDP_DHC</B></PRE><DL><DD>Elliptic curve secret value derivation primitive, Diffie-Hellman version, with cofactor multiplication, as per [IEEE P1363]. (output value is to be equal to that from <CODE>ALG_EC_SVDP_DH</CODE>)<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javacard.security.KeyAgreement.ALG_EC_SVDP_DHC">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="KeyAgreement()"><!-- --></A><H3>KeyAgreement</H3><PRE>protected <B>KeyAgreement</B>()</PRE><DL><DD>Protected constructor.<P></DL><!-- ============ 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="getInstance(byte, boolean)"><!-- --></A><H3>getInstance</H3><PRE>public static final <A HREF="../../javacard/security/KeyAgreement.html" title="class in javacard.security">KeyAgreement</A> <B>getInstance</B>(byte&nbsp;algorithm,                                             boolean&nbsp;externalAccess)                                      throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Creates a <CODE>KeyAgreement</CODE> object instance of the selected algorithm.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>algorithm</CODE> - the desired key agreement algorithm Valid codes listed in <CODE>ALG_*</CODE> constants above, for example, <A HREF="../../javacard/security/KeyAgreement.html#ALG_EC_SVDP_DH"><CODE>ALG_EC_SVDP_DH</CODE></A>.<DD><CODE>externalAccess</CODE> - if <code>true</code> indicates that the instance will be shared among multiple applet instances and that the <code>KeyAgreement</code> instance will also be accessed (via a <code>Shareable</code> interface) when the owner of the <code>KeyAgreement</code> instance is not the currently selected applet. If <code>true</code> the implementation must not  allocate <code>CLEAR_ON_DESELECT</code> transient space for internal data.<DT><B>Returns:</B><DD>the KeyAgreement object instance of the requested algorithm<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason codes:<ul> <li><code>CryptoException.NO_SUCH_ALGORITHM</code> if the requested algorithm or shared access mode is not supported. </ul></DL></DD></DL><HR><A NAME="init(javacard.security.PrivateKey)"><!-- --></A><H3>init</H3><PRE>public abstract void <B>init</B>(<A HREF="../../javacard/security/PrivateKey.html" title="interface in javacard.security">PrivateKey</A>&nbsp;privKey)                   throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Initializes the object with the given private key.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>privKey</CODE> - the private key<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason codes:<ul> <li><code>CryptoException.ILLEGAL_VALUE</code> if the input key type is inconsistent with the <code>KeyAgreement</code> algorithm,  for example, if the <code>KeyAgreement</code> algorithm is <code>ALG_EC_SVDP_DH</code> and the key type is  <code>TYPE_RSA_PRIVATE</code>, or if <code>privKey</code> is inconsistent with the implementation.</li> <li><code>CryptoException.UNINITIALIZED_KEY</code> if <code>privKey</code> is uninitialized, or if the <code>KeyAgreement</code> algorithm is set to <CODE>ALG_EC_SVDP_DHC</CODE> and the cofactor, K,  has not been successfully initialized since the time the initialized state of the key was set to false.</li> </ul></DL></DD></DL><HR><A NAME="getAlgorithm()"><!-- --></A><H3>getAlgorithm</H3><PRE>public abstract byte <B>getAlgorithm</B>()</PRE><DL><DD>Gets the KeyAgreement algorithm.<P><DD><DL><DT><B>Returns:</B><DD>the algorithm code defined above</DL></DD></DL><HR><A NAME="generateSecret(byte[], short, short, byte[], short)"><!-- --></A><H3>generateSecret</H3><PRE>public abstract short <B>generateSecret</B>(byte[]&nbsp;publicData,                                     short&nbsp;publicOffset,                                     short&nbsp;publicLength,                                     byte[]&nbsp;secret,                                     short&nbsp;secretOffset)                              throws <A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></PRE><DL><DD>Generates the secret data as per the requested algorithm using the <code>PrivateKey</code> specified during initialization and the public key data provided. Note that in the case of the algorithms <CODE>ALG_EC_SVDP_DH</CODE> and <CODE>ALG_EC_SVDP_DHC</CODE> the public key data provided should be the public elliptic curve point of the second party in the protocol, specified as per ANSI X9.62. A specific implementation need not support the compressed form, but must support the uncompressed form of the point.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>publicData</CODE> - buffer holding the public data of the second party<DD><CODE>publicOffset</CODE> - offset into the publicData buffer at which the data begins<DD><CODE>publicLength</CODE> - byte length of the public data<DD><CODE>secret</CODE> - buffer to hold the secret output<DD><CODE>secretOffset</CODE> - offset into the secret array at which to start writing the secret<DT><B>Returns:</B><DD>byte length of the secret<DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/security/CryptoException.html" title="class in javacard.security">CryptoException</A></CODE> - with the following reason codes:<ul> <li><code>CryptoException.ILLEGAL_VALUE</code> if the <code>publicData</code> data format is incorrect, or if the <code>publicData</code> data is inconsistent with the <code>PrivateKey</code> specified during initialization. <li><code>CryptoException.INVALID_INIT</code> if this <code>KeyAgreement</code> object is not initialized.</ul></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/KeyAgreement.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/Key.html" title="interface in javacard.security"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javacard/security/KeyBuilder.html" title="class in javacard.security"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?javacard/security/KeyAgreement.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="KeyAgreement.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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 + -