RSA BSAFE CRYPTO-J

Cryptographic Components for Java

JSAFE Javadoc JCE Javadoc Search

JSAFE_Key Interface Reference

The JSAFE_Key class is the generic key interface.

All key objects implement this class, including both symmetric and asymmetric keys. See Overview of Crypto-J for background and reference material on using and understanding Crypto-J.

Copyright © RSA Security Inc., 1997-2005. All rights reserved.

Inheritance diagram for JSAFE_Key:

JSAFE_PrivateKey JSAFE_PublicKey JSAFE_SecretKey List of all members.

Public Methods

String JSAFE_Key:: getDevice ()
 Returns the name of the device of record. More...

String JSAFE_Key:: getAlgorithm ()
 Returns the standard name for the algorithm. More...

int JSAFE_Key:: getMaximumKeyLength ()
 Gets the maximum number of bits this key is allowed to have. More...

int JSAFE_Key:: getMinimumKeyLength ()
 Gets the minimum number of bits this key is allowed to have. More...

String [] JSAFE_Key:: getSupportedGetFormats ()
 Gets the formats in which this key can return the data. More...

String [] JSAFE_Key:: getSupportedSetFormats ()
 Gets the formats with which this key may be set. More...

String JSAFE_Key:: getKeyWrappingFormat (boolean ber)
 Returns the name of the format to use when getting the data for key wrapping. More...

byte [][] JSAFE_Key:: getKeyData ()
 Gets the key data from the object and returns it in the default format. More...

void JSAFE_Key:: clearSensitiveData ()
 This method clears sensitive data from an object. More...


Member Function Documentation

void JSAFE_Key::clearSensitiveData   ;
 

This method clears sensitive data from an object. Although the finalizer clears the data, there is no guarantee the garbage collector will quickly call the finalizer. Allows a user to clear data as soon as possible. After calling clearSensitiveData(), an Init (not a ReInit) method is called to perform other operations with the object.

Implemented in JSAFE_PrivateKey.

String JSAFE_Key::getAlgorithm   ;
 

Returns the standard name for the algorithm.

Returns:
A String giving the standard algorithm name.

Implemented in JSAFE_PrivateKey.

String JSAFE_Key::getDevice   ;
 

Returns the name of the device of record.

Possible device values are:

  • Java
  • Native
  • name of the specified device
Returns:
The device name.

Implemented in JSAFE_PrivateKey.

byte [][] JSAFE_Key::getKeyData   ;
 

Gets the key data from the object and returns it in the default format.

Returns:
A byte array containing the key data.

Implemented in JSAFE_SecretKey.

String JSAFE_Key::getKeyWrappingFormat boolean    ber ;
 

Returns the name of the format to use when getting the data for key wrapping. Use ber to specify whether the data should be BER-encoded or not.

Parameters:
ber A boolean indicating whether the data is wrapped BER-encoded (true) or not (false).
Returns:
A String that is the format.

Implemented in JSAFE_PrivateKey.

int JSAFE_Key::getMaximumKeyLength   ;
 

Gets the maximum number of bits this key is allowed to have.

Returns:
An int that is the maximum size, in bits, of the key.

Implemented in JSAFE_SecretKey.

int JSAFE_Key::getMinimumKeyLength   ;
 

Gets the minimum number of bits this key is allowed to have.

Returns:
An int that is the minimum size, in bits, of the key.

Implemented in JSAFE_SecretKey.

String [] JSAFE_Key::getSupportedGetFormats   ;
 

Gets the formats in which this key can return the data. This method returns a String array that lists the formats supported by getKeyData(). The return value can be a zero-length array if the object does not contain key data. The first element in the list is the default format.

Returns:
A String array that is the list of valid formats.

Implemented in JSAFE_SecretKey.

String [] JSAFE_Key::getSupportedSetFormats   ;
 

Gets the formats with which this key may be set. Returns a String array that lists the formats supported by setKeyData(). The first element in the list is the default format.

Returns:
A String array that is the list of valid formats.

Implemented in JSAFE_SecretKey.


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 038-001001-3500-001-000 - 3.5