|
Cryptix V3.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xjava.security.IJCE
The IJCE class provides an interface to features that were not present in JavaSoft's initial version of JCE. Hopefully the getAlgorithms and/or the enable/disableTracing methods will be incorporated into a later version of the standard.
If you bundle this classfile, and the other classfiles in java.security.* that have names starting "IJCE_" with your application, these methods should work as documented even if linked against JavaSoft's implementation, so using them does not result in any loss of compatibility.
This class also defines the version number of the IJCE library:
Version numbers should be written as a triple of integers, not as a decimal. If the last number is omitted it is assumed to be 0, so for example, version 1.10 is after version 1.2.
The IJCE version number corresponding to this documentation is 1.1. (This is independent of the version numbers of any libraries that IJCE may be distributed with, such as Cryptix.)
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.5 $
Method Summary | |
static void |
disableTracing(java.lang.Object obj)
Disables tracing of SPI methods for obj. |
static boolean |
enableTracing(java.lang.Object obj)
Enables tracing of calls to SPI methods for the algorithm object obj, with Output sent to the default location, given by getDebugOutput() . |
static boolean |
enableTracing(java.lang.Object obj,
java.io.PrintWriter out)
Enables tracing of calls to SPI methods for the algorithm object obj. |
static Target |
findTarget(java.lang.String name)
Returns a Target that can be passed to PrivilegeManager.enablePrivilege(...) , in order to request
permission for an action that requires the user's trust. |
static Target |
findTarget(java.lang.String name,
java.lang.Object arg)
Reserved for future use, in case parameterized targets are needed. |
static java.lang.String[] |
getAlgorithms(java.security.Provider provider,
java.lang.String type)
Gets the standard names of all algorithms of the given type implemented by a provider. |
static java.lang.String[] |
getAlgorithms(java.lang.String type)
Gets the standard names of all algorithms of the given type implemented by any installed provider. |
static java.lang.Object |
getImplementation(java.lang.String algorithm,
java.lang.String type)
Returns an object configured to the specified type. |
static java.lang.Object |
getImplementation(java.lang.String algorithm,
java.lang.String provider,
java.lang.String type)
Returns an object configured to the specified type. |
static java.lang.Class |
getImplementationClass(java.lang.String algorithm,
java.lang.String type)
Given an algorithm name (which may be an alias) and type, returns the corresponding algorithm class from any provider. |
static java.lang.Class |
getImplementationClass(java.lang.String algorithm,
java.lang.String provider,
java.lang.String type)
Given an algorithm name (which may be an alias), a provider name, and a type, returns the corresponding algorithm class. |
static int |
getIntermediateVersion()
Returns the intermediate version of this release of IJCE. |
static int |
getMajorVersion()
Returns the major version of this release of IJCE. |
static int |
getMinorVersion()
Returns the minor version of this release of IJCE. |
static java.lang.String |
getReleaseDate()
Returns the release date of this version of IJCE, as a string in the form "yyyy/mm/dd". |
static java.lang.String |
getStandardName(java.lang.String algorithm,
java.lang.String type)
Expands the possible alias algorithm to a standard name. |
static java.lang.String |
getVersionString()
Returns a string describing this version of IJCE. |
static boolean |
isProvidingJCA()
Returns true if IJCE is providing the implementations of the JCA classes (MessageDigest, Signature, etc). |
static boolean |
isProvidingJCE()
Returns true if IJCE is providing the implementations of the JCE classes (Cipher, KeyGenerator, etc). |
static boolean |
isVersionAtLeast(int major,
int minor,
int intermediate)
Returns true iff this version of IJCE is at least the given version. |
static void |
main(java.lang.String[] args)
Prints the IJCE version string, a list of statically configured providers, and the location of the library directory. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static java.lang.String[] getAlgorithms(java.security.Provider provider, java.lang.String type)
Possible values for type include "Cipher", "Mode", "PaddingScheme", "MessageDigest", "Signature", "KeyGenerator", and "KeyPairGenerator". Other types can be configured in the IJCE.properties file.
public static java.lang.String[] getAlgorithms(java.lang.String type)
Possible values for type include "Cipher", "Mode", "PaddingScheme", "MessageDigest", "Signature", "KeyGenerator", and "KeyPairGenerator". Other types can be configured in the IJCE.properties file.
The built-in padding scheme "NONE", or the built-in mode "ECB" are included if applicable.
public static boolean enableTracing(java.lang.Object obj, java.io.PrintWriter out)
Some trivial methods (such as those that get the block size) are not traced.
This can produce a lot of Output, and it should only be used for debugging, when the data being processed by the algorithm object is not secret.
Tracing only works for classes whose implementations are being provided by IJCE. If there is a non-IJCE implementation of the base class for obj (Cipher, MessageDigest, etc.) earlier in the CLASSPATH, it will probably not support tracing, and false will be returned.
Note that the IJCE library includes an implementation of java.io.PrintWriter that will be used automatically when running on Java 1.0.2.
public static boolean enableTracing(java.lang.Object obj)
getDebugOutput()
.public static void disableTracing(java.lang.Object obj)
public static java.lang.String getStandardName(java.lang.String algorithm, java.lang.String type)
Possible values for type include "Cipher", "Mode", "PaddingScheme", "MessageDigest", "Signature", "KeyGenerator", and "KeyPairGenerator". Other types can be configured in the IJCE.properties file.
algorithm
- the possible aliastype
- the type of algorithmpublic static java.lang.Object getImplementation(java.lang.String algorithm, java.lang.String type) throws java.security.NoSuchAlgorithmException
Possible values for type include "Cipher", "Mode", "PaddingScheme", "MessageDigest", "Signature", "KeyGenerator", and "KeyPairGenerator". Other types can be configured in the IJCE.properties file.
algorithm
- the standard name or an alias for the algorithm.type
- the type of algorithm.public static java.lang.Object getImplementation(java.lang.String algorithm, java.lang.String provider, java.lang.String type) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException
Possible values for type include "Cipher", "Mode", "PaddingScheme", "MessageDigest", "Signature", "KeyGenerator", and "KeyPairGenerator". Other types can be configured in the IJCE.properties file.
algorithm
- the standard name or an alias for the algorithm.provider
- the string name of the provider.type
- the type of algorithm.public static java.lang.Class getImplementationClass(java.lang.String algorithm, java.lang.String type) throws java.security.NoSuchAlgorithmException
public static java.lang.Class getImplementationClass(java.lang.String algorithm, java.lang.String provider, java.lang.String type) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException
public static Target findTarget(java.lang.String name) throws ForbiddenTargetException
PrivilegeManager.enablePrivilege(...)
, in order to request
permission for an action that requires the user's trust.
Currently the following target names are recognized:
name
- the name of the target to be returnedpublic static Target findTarget(java.lang.String name, java.lang.Object arg) throws ForbiddenTargetException
name
- the name of the target to be returnedarg
- a parameter objectpublic static int getMajorVersion()
public static int getMinorVersion()
public static int getIntermediateVersion()
public static boolean isVersionAtLeast(int major, int minor, int intermediate)
public static java.lang.String getReleaseDate()
public static java.lang.String getVersionString()
public static boolean isProvidingJCA()
public static boolean isProvidingJCE()
public static void main(java.lang.String[] args)
|
Cryptix V3.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |