📄 algorithmparameters.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:35:55 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class AlgorithmParameters</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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> </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/AlgorithmParameters.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-files/index-1.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<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/security/AlgorithmParameterGeneratorSpi.html"><B>PREV CLASS</B></A> <A HREF="../../java/security/AlgorithmParametersSpi.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> <A HREF="AlgorithmParameters.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.security</FONT><BR>Class AlgorithmParameters</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.security.AlgorithmParameters</B></PRE><HR><DL><DT>public class <B>AlgorithmParameters</B><DT>extends <A HREF="../../java/lang/Object.html">Object</A></DL><P>This class is used as an opaque representation of cryptographic parameters. <p>An <code>AlgorithmParameters</code> object for managing the parameters for a particular algorithm can be obtained by calling one of the <code>getInstance</code> factory methods (static methods that return instances of a given class). <p>There are two ways to request such an implementation: by specifying either just an algorithm name, or both an algorithm name and a package provider. <ul> <li>If just an algorithm name is specified, the system will determine if there is an AlgorithmParameters implementation for the algorithm requested available in the environment, and if there is more than one, if there is a preferred one. <li>If both an algorithm name and a package provider are specified, the system will determine if there is an implementation in the package requested, and throw an exception if there is not. </ul> <p>Once an <code>AlgorithmParameters</code> object is returned, it must be initialized via a call to <code>init</code>, using an appropriate parameter specification or parameter encoding. <p>A transparent parameter specification is obtained from an <code>AlgorithmParameters</code> object via a call to <code>getParameterSpec</code>, and a byte encoding of the parameters is obtained via a call to <code>getEncoded</code>.<P><DL><DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/security/spec/AlgorithmParameterSpec.html"><CODE>AlgorithmParameterSpec</CODE></A>, <A HREF="../../java/security/spec/DSAParameterSpec.html"><CODE>DSAParameterSpec</CODE></A>, <A HREF="../../java/security/KeyPairGenerator.html"><CODE>KeyPairGenerator</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#AlgorithmParameters(java.security.AlgorithmParametersSpi, java.security.Provider, java.lang.String)">AlgorithmParameters</A></B>(<A HREF="../../java/security/AlgorithmParametersSpi.html">AlgorithmParametersSpi</A> paramSpi, <A HREF="../../java/security/Provider.html">Provider</A> provider, <A HREF="../../java/lang/String.html">String</A> algorithm)</CODE><BR> Creates an AlgorithmParameters object.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getAlgorithm()">getAlgorithm</A></B>()</CODE><BR> Returns the name of the algorithm associated with this parameter object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getEncoded()">getEncoded</A></B>()</CODE><BR> Returns the parameters in their primary encoding format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getEncoded(java.lang.String)">getEncoded</A></B>(<A HREF="../../java/lang/String.html">String</A> format)</CODE><BR> Returns the parameters encoded in the specified scheme.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/security/AlgorithmParameters.html">AlgorithmParameters</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getInstance(java.lang.String)">getInstance</A></B>(<A HREF="../../java/lang/String.html">String</A> algorithm)</CODE><BR> Generates a parameter object for the specified algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/security/AlgorithmParameters.html">AlgorithmParameters</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getInstance(java.lang.String, java.lang.String)">getInstance</A></B>(<A HREF="../../java/lang/String.html">String</A> algorithm, <A HREF="../../java/lang/String.html">String</A> provider)</CODE><BR> Generates a parameter object for the specified algorithm, as supplied by the specified provider, if such an algorithm is available from the provider.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/security/spec/AlgorithmParameterSpec.html">AlgorithmParameterSpec</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getParameterSpec(java.lang.Class)">getParameterSpec</A></B>(<A HREF="../../java/lang/Class.html">Class</A> paramSpec)</CODE><BR> Returns a (transparent) specification of this parameter object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/security/Provider.html">Provider</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#getProvider()">getProvider</A></B>()</CODE><BR> Returns the provider of this parameter object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#init(java.security.spec.AlgorithmParameterSpec)">init</A></B>(<A HREF="../../java/security/spec/AlgorithmParameterSpec.html">AlgorithmParameterSpec</A> paramSpec)</CODE><BR> Initializes this parameter object using the parameters specified in <code>paramSpec</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#init(byte[])">init</A></B>(byte[] params)</CODE><BR> Imports the specified parameters and decodes them according to the primary decoding format for parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#init(byte[], java.lang.String)">init</A></B>(byte[] params, <A HREF="../../java/lang/String.html">String</A> format)</CODE><BR> Imports the parameters from <code>params</code> and decodes them according to the specified decoding scheme.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/security/AlgorithmParameters.html#toString()">toString</A></B>()</CODE><BR> Returns a formatted string describing the parameters.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -