|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rsa.jsafe.JSAFE_Object
com.rsa.jsafe.JSAFE_PublicKey
This class holds public keys for all asymmetric operations and implements
the JSAFE_Key interface.
See Overview of Crypto-J for background and reference material on using and understanding Crypto-J.
Note: Not all Crypto-J transformations have OIDs assigned to them. See Crypto-J Transformations and Their Associated Classes for a list of transformations that have assigned OIDs.
Copyright © RSA Security Inc., 1997-2005. All rights reserved.
| Constructor Summary | |
JSAFE_PublicKey()
|
|
| Method Summary | |
void |
clearSensitiveData()
Clears sensitive data from an object. |
abstract Object |
clone()
Overrides the default clone to produce a deep clone. |
abstract boolean |
dataEquals(Object obj)
Compares only the data of the objects, ignoring token info, if any. |
abstract String |
getAlgorithm()
Returns the standard algorithm name. |
getDevice()
Returns the name of the device of record. |
|
String[] |
getDeviceList()
Returns a |
static JSAFE_PublicKey |
getInstance(byte[] berInfo,
int offset,
String device)
Builds an object that contains the public key that is
defined in |
static JSAFE_PublicKey |
getInstance(String transformation,
String device)
Builds an object that holds a public key for the
|
getKeyWrappingFormat(boolean ber)
Returns the name of the format to use when getting the data for key wrapping. |
|
static int |
getNextBEROffset(byte[] keyBER,
int offset)
Gets the next offset after the algorithm ID. |
| Methods inherited from class com.rsa.jsafe.JSAFE_Object |
overwrite, overwrite |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.rsa.jsafe.JSAFE_Key |
getKeyData, getKeyData, getMaximumKeyLength, getMinimumKeyLength, getSupportedGetFormats, getSupportedSetFormats, setKeyData, setKeyData |
| Constructor Detail |
public JSAFE_PublicKey()
| Method Detail |
public static JSAFE_PublicKey getInstance(byte[] berInfo,
int offset,
String device)
throws JSAFE_UnimplementedException
berInfo, beginning at offset. This is
the BER encoding of the public-key information.
The specified device is used.
berInfo - A byte array containing the BER encoding
of the key.offset - The offset into berInfo where the
encoding begins.device - A list of devices used to build the object.
JSAFE_PublicKey object for the specified
algorithm.
JSAFE_UnimplementedException - If the device or devices cannot
perform the designated algorithm, or the toolkit cannot decode
the BER encoding.
public static int getNextBEROffset(byte[] keyBER,
int offset)
throws JSAFE_UnimplementedException
berAlgID, the BER encoding of the algorithm ID,
beginning at offset, returns the index to the next
byte in the array.
keyBER - A byte array containing the BER encoding
of a public key.offset - The offset into keyBER where the
encoding begins.
keyBER of the byte following the key.
JSAFE_UnimplementedException - If the toolkit cannot decode the
BER encoding.
public static JSAFE_PublicKey getInstance(String transformation,
String device)
throws JSAFE_UnimplementedException
transformation on the given device.
transformation - The representation of the desired operation
(for example, "RSA").device - A list of devices used to build the object
(for example, "Java", "Native/Java").
JSAFE_PublicKey object to use with objects
that perform the transformation.
JSAFE_UnimplementedException - If the device or devices cannot
perform the designated algorithm.public String getDevice()
getDevice in interface JSAFE_Keypublic String[] getDeviceList()
String array that describes all the devices used
to execute the transformation. Because a transformation
often consists of component algorithms, the implementation can consist
of several component objects.
A device can perform one or more of the algorithms, but it may let Java
or another device perform one or more. For example, because padding is not
time consuming, a device might let the Crypto-J implementation perform
padding.
Returns the names of the devices used by each component.
String array that describes the device used for a
specific component.public abstract String getAlgorithm()
getAlgorithm in interface JSAFE_KeyString describing the algorithm.
public abstract Object clone()
throws CloneNotSupportedException
clone in class JSAFE_ObjectCloneNotSupportedException - If the object cannot be cloned.public String getKeyWrappingFormat(boolean ber)
ber to specify whether the data returned
should be BER-encoded or not.
getKeyWrappingFormat in interface JSAFE_Keyber - A boolean indicating whether the data is wrapped
BER-encoded (true) or not (false).
String that is the format name.public abstract boolean dataEquals(Object obj)
false.
obj - The object to compare with.
boolean. Returns true if the two
objects contain the same data; false otherwise.public void clearSensitiveData()
clearSensitiveData(),
an Init (not a ReInit) method is
called to perform other operations with the object.
clearSensitiveData in interface JSAFE_Key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||