javacardx.security
Class CryptoServices

java.lang.Object
  extended by javacardx.security.CryptoServices

@TransactionType(value=NOT_SUPPORTED)
public final class CryptoServices
extends Object

This class centralizes information about all cryptographic algorithm and the cryptographic service providers supported on the platform.

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). Cryptographic services are implemented by the following classes:

The cryptographic algorithm name as used by this class must have one of the following formats:

The cryptographic service name for each of the cryptographic service implementation classes listed above is defined by the constant SERVICE_NAME in each of these classes. Each of these classes also defines the constants for each of the algorithms and types these cryptographic service support.

Since:
Java Card 3.0
See Also:
Checksum, KeyAgreement, KeyBuilder, KeyPair, MessageDigest, RandomData, Signature, Cipher

Method Summary
static String[] getAlgorithms()
          Returns an array containing the names of all available algorithms on the platform.
static String[] getProviders()
          Returns an array containing all the installed providers.
static String[] getProviders(String filter)
          Returns an array containing all installed providers that satisfy the specified selection criteria, or null if no such providers have been installed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProviders

public static String[] getProviders()
Returns an array containing all the installed providers. The order of the providers in the array is their preference order.

Note: this method returns a different array (a defensive copy) upon each call in order to guarantee the immutability of the underlying system data structures.

Returns:
an array of all the installed providers, or null if none have been installed.

getAlgorithms

public static String[] getAlgorithms()
Returns an array containing the names of all available algorithms on the platform. Algorithm names are in the form: For example, "keyBuilder.DES".

Note: this method returns a different array (a defensive copy) upon each call in order to guarantee the immutability of the underlying system data structure.

Returns:
an array containing the names of all available algorithms on the platform, or null if none have been installed.

getProviders

public static String[] getProviders(String filter)
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 preference order. The selection criterion must be specified in the following format:

A provider satisfies the specified selection criterion iff the provider implements the specified algorithm or type for the specified cryptographic service.

For example, "keyBuilder.DES" would be satisfied by any provider that supplied a KeyBuilder implementation for DES keys.

Note: this method returns a different array (a defensive copy) upon each call in order to guarantee the immutability of the underlying system data structure.

Parameters:
filter - the criterion for selecting providers or null for any provider. The filter is case-insensitive.
Returns:
all the installed providers that satisfy the selection criterion, or null if no such providers have been installed.


Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.