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

📄 signaturespi.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="engineInitVerify(java.security.PublicKey)"><!-- --></A><H3>engineInitVerify</H3><PRE>protected abstract void <B>engineInitVerify</B>(<A HREF="../../java/security/PublicKey.html">PublicKey</A>&nbsp;publicKey)                                  throws <A HREF="../../java/security/InvalidKeyException.html">InvalidKeyException</A></PRE><DL><DD>Initializes this signature object with the specified public key for verification operations.<DD><DL><DT><B>Parameters:</B><DD><CODE>publicKey</CODE> - the public key of the identity whose signature is going to be verified.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidKeyException.html">InvalidKeyException</A></CODE> - if the key is improperly encoded, parameters are missing, and so on.</DL></DD></DL><HR><A NAME="engineInitSign(java.security.PrivateKey)"><!-- --></A><H3>engineInitSign</H3><PRE>protected abstract void <B>engineInitSign</B>(<A HREF="../../java/security/PrivateKey.html">PrivateKey</A>&nbsp;privateKey)                                throws <A HREF="../../java/security/InvalidKeyException.html">InvalidKeyException</A></PRE><DL><DD>Initializes this signature object with the specified private key for signing operations.<DD><DL><DT><B>Parameters:</B><DD><CODE>privateKey</CODE> - the private key of the identity whose signature will be generated.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidKeyException.html">InvalidKeyException</A></CODE> - if the key is improperly encoded, parameters are missing, and so on.</DL></DD></DL><HR><A NAME="engineInitSign(java.security.PrivateKey, java.security.SecureRandom)"><!-- --></A><H3>engineInitSign</H3><PRE>protected void <B>engineInitSign</B>(<A HREF="../../java/security/PrivateKey.html">PrivateKey</A>&nbsp;privateKey,                              <A HREF="../../java/security/SecureRandom.html">SecureRandom</A>&nbsp;random)                       throws <A HREF="../../java/security/InvalidKeyException.html">InvalidKeyException</A></PRE><DL><DD>Initializes this signature object with the specified private key and source of randomness for signing operations. <p>This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.)<DD><DL><DT><B>Parameters:</B><DD><CODE>privateKey</CODE> - the private key of the identity whose signature will be generated.<DD><CODE>random</CODE> - the source of randomness<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidKeyException.html">InvalidKeyException</A></CODE> - if the key is improperly encoded, parameters are missing, and so on.</DL></DD></DL><HR><A NAME="engineUpdate(byte)"><!-- --></A><H3>engineUpdate</H3><PRE>protected abstract void <B>engineUpdate</B>(byte&nbsp;b)                              throws <A HREF="../../java/security/SignatureException.html">SignatureException</A></PRE><DL><DD>Updates the data to be signed or verified using the specified byte.<DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the byte to use for the update.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/SignatureException.html">SignatureException</A></CODE> - if the engine is not initialized properly.</DL></DD></DL><HR><A NAME="engineUpdate(byte[], int, int)"><!-- --></A><H3>engineUpdate</H3><PRE>protected abstract void <B>engineUpdate</B>(byte[]&nbsp;b,                                     int&nbsp;off,                                     int&nbsp;len)                              throws <A HREF="../../java/security/SignatureException.html">SignatureException</A></PRE><DL><DD>Updates the data to be signed or verified, using the  specified array of bytes, starting at the specified offset.<DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the array of bytes.<DD><CODE>off</CODE> - the offset to start from in the array of bytes.<DD><CODE>len</CODE> - the number of bytes to use, starting at offset.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/SignatureException.html">SignatureException</A></CODE> - if the engine is not initialized  properly.</DL></DD></DL><HR><A NAME="engineSign()"><!-- --></A><H3>engineSign</H3><PRE>protected abstract byte[] <B>engineSign</B>()                              throws <A HREF="../../java/security/SignatureException.html">SignatureException</A></PRE><DL><DD>Returns the signature bytes of all the data updated so far.     The format of the signature depends on the underlying  signature scheme.<DD><DL><DT><B>Returns:</B><DD>the signature bytes of the signing operation's result.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/SignatureException.html">SignatureException</A></CODE> - if the engine is not initialized properly.</DL></DD></DL><HR><A NAME="engineSign(byte[], int, int)"><!-- --></A><H3>engineSign</H3><PRE>protected int <B>engineSign</B>(byte[]&nbsp;outbuf,                         int&nbsp;offset,                         int&nbsp;len)                  throws <A HREF="../../java/security/SignatureException.html">SignatureException</A></PRE><DL><DD>Finishes this signature operation and stores the resulting signature bytes in the provided buffer <code>outbuf</code>, starting at <code>offset</code>. The format of the signature depends on the underlying  signature scheme.  <p>The signature implementation is reset to its initial state (the state it was in after a call to one of the <code>engineInitSign</code> methods) and can be reused to generate further signatures with the same private key. This method should be abstract, but we leave it concrete for binary compatibility.  Knowledgeable providers should override this method.<DD><DL><DT><B>Parameters:</B><DD><CODE>outbuf</CODE> - buffer for the signature result.<DD><CODE>offset</CODE> - offset into <code>outbuf</code> where the signature is stored.<DD><CODE>len</CODE> - number of bytes within <code>outbuf</code> allotted for the signature. Both this default implementation and the SUN provider do not return partial digests. If the value of this parameter is less than the actual signature length, this method will throw a SignatureException. This parameter is ignored if its value is greater than or equal to the actual signature length.<DT><B>Returns:</B><DD>the number of bytes placed into <code>outbuf</code><DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/SignatureException.html">SignatureException</A></CODE> - if an error occurs or <code>len</code> is less than the actual signature length.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="engineVerify(byte[])"><!-- --></A><H3>engineVerify</H3><PRE>protected abstract boolean <B>engineVerify</B>(byte[]&nbsp;sigBytes)                                 throws <A HREF="../../java/security/SignatureException.html">SignatureException</A></PRE><DL><DD>Verifies the passed-in signature.<DD><DL><DT><B>Parameters:</B><DD><CODE>sigBytes</CODE> - the signature bytes to be verified.<DT><B>Returns:</B><DD>true if the signature was verified, false if not.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/SignatureException.html">SignatureException</A></CODE> - if the engine is not initialized  properly, or the passed-in signature is improperly encoded or  of the wrong type, etc.</DL></DD></DL><HR><A NAME="engineSetParameter(java.lang.String, java.lang.Object)"><!-- --></A><H3>engineSetParameter</H3><PRE>protected abstract void <B>engineSetParameter</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;param,                                           <A HREF="../../java/lang/Object.html">Object</A>&nbsp;value)                                    throws <A HREF="../../java/security/InvalidParameterException.html">InvalidParameterException</A></PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>Replaced by <A HREF="../../java/security/SignatureSpi.html#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"><CODE>engineSetParameter</CODE></A>.</I><P><DD>Sets the specified algorithm parameter to the specified value. This method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object.  A parameter may be any settable parameter for the algorithm, such as  a parameter size, or a source of random bits for signature generation  (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific  naming scheme for each parameter is desirable but left unspecified  at this time.<DD><DL><DT><B>Parameters:</B><DD><CODE>param</CODE> - the string identifier of the parameter.<DD><CODE>value</CODE> - the parameter value.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidParameterException.html">InvalidParameterException</A></CODE> - if <code>param</code> is an invalid parameter for this signature algorithm engine, the parameter is already set and cannot be set again, a security exception occurs, and so on.</DL></DD></DL><HR><A NAME="engineSetParameter(java.security.spec.AlgorithmParameterSpec)"><!-- --></A><H3>engineSetParameter</H3><PRE>protected void <B>engineSetParameter</B>(<A HREF="../../java/security/spec/AlgorithmParameterSpec.html">AlgorithmParameterSpec</A>&nbsp;params)                           throws <A HREF="../../java/security/InvalidAlgorithmParameterException.html">InvalidAlgorithmParameterException</A></PRE><DL><DD>Initializes this signature engine with the specified parameter set. This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.) It may be overridden by a provider to set the algorithm parameters using the specified <code>params</code>. Such an override is expected to throw an InvalidAlgorithmParameterException if a parameter is invalid. If this method is not overridden, it always throws an UnsupportedOperationException.<DD><DL><DT><B>Parameters:</B><DD><CODE>params</CODE> - the parameters<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidAlgorithmParameterException.html">InvalidAlgorithmParameterException</A></CODE> - if the given parameters are inappropriate for this signature engine</DL></DD></DL><HR><A NAME="engineGetParameter(java.lang.String)"><!-- --></A><H3>engineGetParameter</H3><PRE>protected abstract <A HREF="../../java/lang/Object.html">Object</A> <B>engineGetParameter</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;param)                                      throws <A HREF="../../java/security/InvalidParameterException.html">InvalidParameterException</A></PRE><DL><DD><B>Deprecated.</B>&nbsp;<I></I>&nbsp;<P><DD>Gets the value of the specified algorithm parameter.  This method supplies a general-purpose mechanism through which it  is possible to get the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter  size, or  a source of random bits for signature generation (if  appropriate), or an indication of whether or not to perform a  specific but optional computation. A uniform algorithm-specific  naming scheme for each parameter is desirable but left unspecified  at this time.<DD><DL><DT><B>Parameters:</B><DD><CODE>param</CODE> - the string name of the parameter.<DT><B>Returns:</B><DD>the object that represents the parameter value, or null if there is none.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidParameterException.html">InvalidParameterException</A></CODE> - if <code>param</code> is an  invalid parameter for this engine, or another exception occurs while trying to get this parameter.</DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>clone</B>()             throws <A HREF="../../java/lang/CloneNotSupportedException.html">CloneNotSupportedException</A></PRE><DL><DD>Returns a clone if the implementation is cloneable.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a clone if the implementation is cloneable.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/CloneNotSupportedException.html">CloneNotSupportedException</A></CODE> - if this is called on an implementation that does not support <code>Cloneable</code>.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <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/SignatureSpi.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-files/index-1.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<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/security/Signature.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/security/SignedObject.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SignatureSpi.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&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><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -