java.lang.Object | +--java.security.Security
static int | addProvider(java.security.Provider provider) Adds a provider to the next position available. |
static java.lang.String | getAlgorithmProperty(java.lang.String algName, java.lang.String propName) Gets a specific property for an algorithm. |
static java.lang.String | getProperty(java.lang.String key) Gets the value of a security property. |
static java.security.Provider | getProvider(java.lang.String name) Returns the provider with the specified name. |
static java.security.Provider[] | getProviders() Returns array containing all the providers. |
static int | insertProviderAt(java.security.Provider provider, int position) Adds a new provider, at a specified position. |
static void | removeProvider(java.lang.String name) Removes a provider. |
static void | setProperty(java.lang.String key, java.lang.String datnum) Sets the value of a security property. |
public static int addProvider(java.security.Provider provider)
NOT IMPLEMENTED YET: [
First, if there is a security manager, its checkSecurityAccess
method is called with the string
"insertProvider."+provider.getName()
to see if it's ok to add a new provider. If the default implementation of
checkSecurityAccess
is used (i.e., that method is not
overriden), then this will result in a call to the security manager's
checkPermission
method with a SecurityPermission(
"insertProvider."+provider.getName())
permission.]
provider
- the provider to be added.
-1
if the provider was not added because it is already installed.SecurityException
- if a security manager exists and its
SecurityManager.checkSecurityAccess(java.lang.String)
method denies
access to add a new provider.public static String getAlgorithmProperty(java.lang.String algName, java.lang.String propName)
algName
- name of algorithm to get property ofpropName
- name of property to checkpublic static String getProperty(java.lang.String key)
key
- property to getSecurityException
- - if the security manager denies access to
getting a propertypublic static Provider getProvider(java.lang.String name)
name
- name of the requested providerpublic static Provider[] getProviders()
public static int insertProviderAt(java.security.Provider provider, int position)
If the given provider is installed at the requested position, the provider that used to be at that position, and all providers with a position greater than position, are shifted up one position (towards the end of the list of installed providers).
A provider cannot be added if it is already installed.
NOT IMPLEMENTED YET:[
First, if there is a security manager, its checkSecurityAccess
method is called with the string
"insertProvider."+provider.getName()
to see if it's ok to add a new provider. If the default implementation of
checkSecurityAccess
is used (i.e., that method is not
overriden), then this will result in a call to the security manager's
checkPermission
method with a SecurityPermission(
"insertProvider."+provider.getName())
permission.]
provider
- the provider to be added.position
- the preference position that the caller would like for
this provider.SecurityException
- if a security manager exists and its
SecurityManager.checkSecurityAccess(java.lang.String)
method denies
access to add a new provider.public static void removeProvider(java.lang.String name)
name
- name of the provider to addSecurityException
- - if the security manager denies access to
remove a new providerpublic static void setProperty(java.lang.String key, java.lang.String datnum)
key
- property to setdatnum
- new value of propertySecurityException
- - if the security manager denies access to
setting a property