Android
java.security
public final class

java.security.Security

java.lang.Object
java.security.Security

For access to security providers and properties.

Summary

Public Methods

      static    int  addProvider(Provider provider)
Adds the extra provider to the collection of providers.
      static    String  getAlgorithmProperty(String algName, String propName)
This method is deprecated. Use AlgorithmParameters and KeyFactory instead
      static    Set<String getAlgorithms(String serviceName)
      static    String  getProperty(String key)
Returns the value of the security property named by the argument.
  synchronized    static    Provider  getProvider(String name)
  synchronized    static    Provider[]  getProviders(Map<StringString> filter)
      static    Provider[]  getProviders(String filter)
Returns the collection of providers which meet the user supplied string filter.
  synchronized    static    Provider[]  getProviders()
  synchronized    static    int  insertProviderAt(Provider provider, int position)
  synchronized    static    void  removeProvider(String name)
      static    void  setProperty(String key, String datnum)
Sets a given security property.
Methods inherited from class java.lang.Object

Details

Public Methods

public static int addProvider(Provider provider)

Adds the extra provider to the collection of providers.

Returns

  • int The priority/position of the provider added.

Throws

SecurityException If there is a SecurityManager installed and it denies adding a new provider.

public static String getAlgorithmProperty(String algName, String propName)

This method is deprecated. Use AlgorithmParameters and KeyFactory instead

Deprecated method which returns null.

Returns

  • null

public static Set<String> getAlgorithms(String serviceName)

public static String getProperty(String key)

Returns the value of the security property named by the argument.

Parameters

key String The property name

Returns

  • String The property value

Throws

SecurityException If there is a SecurityManager installed and it will not allow the property to be fetched from the current access control context.

public static synchronized Provider getProvider(String name)

public static synchronized Provider[] getProviders(Map<StringString> filter)

public static Provider[] getProviders(String filter)

Returns the collection of providers which meet the user supplied string filter.

Parameters

filter case-insensitive filter

Returns

  • the providers which meet the user supplied string filter filter. A null value signifies that none of the installed providers meets the filter specification

Throws

InvalidParameterException if an unusable filter is supplied

public static synchronized Provider[] getProviders()

public static synchronized int insertProviderAt(Provider provider, int position)

public static synchronized void removeProvider(String name)

public static void setProperty(String key, String datnum)

Sets a given security property.

Parameters

key String The property name.
datnum String The property value.

Throws

SecurityException If there is a SecurityManager installed and it will not allow the property to be set from the current access control context.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56