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

📄 security.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A HREF="../../java/security/Security.html#removeProvider(java.lang.String)"><CODE>removeProvider(java.lang.String)</CODE></A>, <A HREF="../../java/security/SecurityPermission.html"><CODE>SecurityPermission</CODE></A></DL></DD></DL><HR><A NAME="addProvider(java.security.Provider)"><!-- --></A><H3>addProvider</H3><PRE>public static int <B>addProvider</B>(<A HREF="../../java/security/Provider.html">Provider</A>&nbsp;provider)</PRE><DL><DD>Adds a provider to the next position available. <p>First, if there is a security manager, its <code>checkSecurityAccess</code>  method is called with the string <code>"insertProvider."+provider.getName()</code>  to see if it's ok to add a new provider.  If the default implementation of <code>checkSecurityAccess</code>  is used (i.e., that method is not overriden), then this will result in a call to the security manager's <code>checkPermission</code> method with a <code>SecurityPermission("insertProvider."+provider.getName())</code> permission.<DD><DL><DT><B>Parameters:</B><DD><CODE>provider</CODE> - the provider to be added.<DT><B>Returns:</B><DD>the preference position in which the provider was  added, or -1 if the provider was not added because it is already installed.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code><A HREF="../../java/lang/SecurityManager.html#checkSecurityAccess(java.lang.String)"><CODE>SecurityManager.checkSecurityAccess(java.lang.String)</CODE></A></code> method          denies access to add a new provider<DT><B>See Also: </B><DD><A HREF="../../java/security/Security.html#getProvider(java.lang.String)"><CODE>getProvider(java.lang.String)</CODE></A>, <A HREF="../../java/security/Security.html#removeProvider(java.lang.String)"><CODE>removeProvider(java.lang.String)</CODE></A>, <A HREF="../../java/security/SecurityPermission.html"><CODE>SecurityPermission</CODE></A></DL></DD></DL><HR><A NAME="removeProvider(java.lang.String)"><!-- --></A><H3>removeProvider</H3><PRE>public static void <B>removeProvider</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name)</PRE><DL><DD>Removes the provider with the specified name. <p>When the specified provider is removed, all providers located at a position greater than where the specified provider was are shifted down one position (towards the head of the list of installed providers). <p>This method returns silently if the provider is not installed.  <p>First, if there is a security manager, its <code>checkSecurityAccess</code>  method is called with the string <code>"removeProvider."+name</code>  to see if it's ok to remove the provider.  If the default implementation of <code>checkSecurityAccess</code>  is used (i.e., that method is not overriden), then this will result in a call to the security manager's <code>checkPermission</code> method with a <code>SecurityPermission("removeProvider."+name)</code> permission.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the provider to remove.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code><A HREF="../../java/lang/SecurityManager.html#checkSecurityAccess(java.lang.String)"><CODE>SecurityManager.checkSecurityAccess(java.lang.String)</CODE></A></code> method          denies          access to remove the provider<DT><B>See Also: </B><DD><A HREF="../../java/security/Security.html#getProvider(java.lang.String)"><CODE>getProvider(java.lang.String)</CODE></A>, <A HREF="../../java/security/Security.html#addProvider(java.security.Provider)"><CODE>addProvider(java.security.Provider)</CODE></A></DL></DD></DL><HR><A NAME="getProviders()"><!-- --></A><H3>getProviders</H3><PRE>public static <A HREF="../../java/security/Provider.html">Provider</A>[] <B>getProviders</B>()</PRE><DL><DD>Returns an array containing all the installed providers. The order of the providers in the array is their preference order.<DD><DL><DT><B>Returns:</B><DD>an array of all the installed providers.</DL></DD></DL><HR><A NAME="getProvider(java.lang.String)"><!-- --></A><H3>getProvider</H3><PRE>public static <A HREF="../../java/security/Provider.html">Provider</A> <B>getProvider</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name)</PRE><DL><DD>Returns the provider installed with the specified name, if any. Returns null if no provider with the speicified name is installed.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the provider to get.<DT><B>Returns:</B><DD>the provider of the specified name.<DT><B>See Also: </B><DD><A HREF="../../java/security/Security.html#removeProvider(java.lang.String)"><CODE>removeProvider(java.lang.String)</CODE></A>, <A HREF="../../java/security/Security.html#addProvider(java.security.Provider)"><CODE>addProvider(java.security.Provider)</CODE></A></DL></DD></DL><HR><A NAME="getProviders(java.lang.String)"><!-- --></A><H3>getProviders</H3><PRE>public static <A HREF="../../java/security/Provider.html">Provider</A>[] <B>getProviders</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;filter)</PRE><DL><DD>Returns an array containing all installed providers that satisfy the specified selection criterion, or null if no such providers have been installed. The returned providers are ordered according to their <a href= "#insertProviderAt(java.security.Provider, int)">preference order</a>.   <p> A cryptographic service is always associated with a particular algorithm or type. For example, a digital signature service is always associated with a particular algorithm (e.g., DSA), and a CertificateFactory service is always associated with a particular certificate type (e.g., X.509). <p>The selection criterion must be specified in one of the following two formats: <ul> <li> <i>&lt;crypto_service>.&lt;algorithm_or_type></i> <p> The cryptographic service name must not contain any dots. <p> A  provider satisfies the specified selection criterion iff the provider implements the  specified algorithm or type for the specified cryptographic service. <p> For example, "CertificateFactory.X.509"  would be satisfied by any provider that supplied a CertificateFactory implementation for X.509 certificates. <li> <i>&lt;crypto_service>.&lt;algorithm_or_type> &lt;attribute_name>:&lt attribute_value></i> <p> The cryptographic service name must not contain any dots. There must be one or more space charaters between the the <i>&lt;algorithm_or_type></i> and the <i>&lt;attribute_name></i>. <p> A provider satisfies this selection criterion iff the provider implements the specified algorithm or type for the specified  cryptographic service and its implementation meets the constraint expressed by the specified attribute name/value pair. <p> For example, "Signature.SHA1withDSA KeySize:1024" would be satisfied by any provider that implemented the SHA1withDSA signature algorithm with a keysize of 1024 (or larger).   </ul> <p> See Appendix A in the <a href= "../../../guide/security/CryptoSpec.html#AppA"> Java Cryptogaphy Architecture API Specification &amp; Reference </a> for information about standard cryptographic service names, standard algorithm names and standard attribute names.<DD><DL><DT><B>Parameters:</B><DD><CODE>filter</CODE> - the criterion for selecting providers. The filter is case-insensitive.<DT><B>Returns:</B><DD>all the installed providers that satisfy the selection criterion, or null if no such providers have been installed.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidParameterException.html">InvalidParameterException</A></CODE> - if the filter is not in the required format</DL></DD></DL><HR><A NAME="getProviders(java.util.Map)"><!-- --></A><H3>getProviders</H3><PRE>public static <A HREF="../../java/security/Provider.html">Provider</A>[] <B>getProviders</B>(<A HREF="../../java/util/Map.html">Map</A>&nbsp;filter)</PRE><DL><DD>Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed.  The returned providers are ordered according to their <a href= "#insertProviderAt(java.security.Provider, int)">preference order</a>.   <p>The selection criteria are represented by a map. Each map entry represents a selection criterion.  A provider is selected iff it satisfies all selection criteria. The key for any entry in such a map must be in one of the following two formats: <ul> <li> <i>&lt;crypto_service>.&lt;algorithm_or_type></i> <p> The cryptographic service name must not contain any dots. <p> The value associated with the key must be an empty string. <p> A provider satisfies this selection criterion iff the provider implements the  specified algorithm or type for the specified cryptographic service. <li>  <i>&lt;crypto_service>.&lt;algorithm_or_type> &lt;attribute_name></i> <p> The cryptographic service name must not contain any dots. There must be one or more space charaters between the <i>&lt;algorithm_or_type></i> and the <i>&lt;attribute_name></i>. <p> The value associated with the key must be a non-empty string. A provider satisfies this selection criterion iff the provider implements the specified algorithm or type for the specified  cryptographic service and its implementation meets the constraint expressed by the specified attribute name/value pair.  </ul> <p> See Appendix A in the <a href= "../../../guide/security/CryptoSpec.html#AppA"> Java Cryptogaphy Architecture API Specification &amp; Reference </a> for information about standard cryptographic service names, standard algorithm names and standard attribute names.<DD><DL><DT><B>Parameters:</B><DD><CODE>filter</CODE> - the criteria for selecting providers. The filter is case-insensitive.<DT><B>Returns:</B><DD>all the installed providers that satisfy the selection criteria, or null if no such providers have been installed.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/security/InvalidParameterException.html">InvalidParameterException</A></CODE> - if the filter is not in the required format</DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public static <A HREF="../../java/lang/String.html">String</A> <B>getProperty</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;key)</PRE><DL><DD>Gets a security property value. <p>First, if there is a security manager, its <code>checkPermission</code>  method is called with a  <code>java.security.SecurityPermission("getProperty."+key)</code> permission to see if it's ok to retrieve the specified security property value..<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the property being retrieved.<DT><B>Returns:</B><DD>the value of the security property corresponding to key.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A></code> method          denies          access to retrieve the specified security property value<DT><B>See Also: </B><DD><A HREF="../../java/security/SecurityPermission.html"><CODE>SecurityPermission</CODE></A></DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>setProperty</H3><PRE>public static void <B>setProperty</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;key,                               <A HREF="../../java/lang/String.html">String</A>&nbsp;datum)</PRE><DL><DD>Sets a security property value. <p>First, if there is a security manager, its <code>checkPermission</code> method is called with a  <code>java.security.SecurityPermission("setProperty."+key)</code> permission to see if it's ok to set the specified security property value.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the name of the property to be set.<DD><CODE>datum</CODE> - the value of the property to be set.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A></code> method          denies access to set the specified security property value<DT><B>See Also: </B><DD><A HREF="../../java/security/SecurityPermission.html"><CODE>SecurityPermission</CODE></A></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/Security.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/SecureRandomSpi.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/security/SecurityPermission.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="Security.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;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><!-- =========== 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 + -