xjava.security
Interface Parameterized

All Known Implementing Classes:
Cipher, HAVAL, HMAC, KeyGenerator, PaddingScheme

public interface Parameterized

This interface is implemented by algorithm objects that may be parameterized (i.e. support the setParameter and getParameter methods). It can be used as a workaround for the absence of these methods in Javasoft's version of JCA/JCE.

This interface is not supported in JavaSoft's version of JCE.

Copyright © 1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.3 $

Since:
IJCE 1.0.1
Author:
David Hopwood

Method Summary
 java.lang.Object getParameter(java.lang.String param)
          Gets the value of the specified algorithm parameter.
 void setParameter(java.lang.String param, java.lang.Object value)
          Sets the specified algorithm parameter to the specified value.
 

Method Detail

setParameter

public void setParameter(java.lang.String param,
                         java.lang.Object value)
                  throws NoSuchParameterException,
                         java.security.InvalidParameterException,
                         InvalidParameterTypeException
Sets the specified algorithm parameter to the specified value.

This method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.

Parameters:
param - the string identifier of the parameter.
value - the parameter value.
Throws:
NullPointerException - if param == null
NoSuchParameterException - if there is no parameter with name param for this cipher implementation.
java.security.InvalidParameterException - if the parameter exists but cannot be set (for example because the object is in the wrong state).
InvalidParameterTypeException - if value is the wrong type for this parameter.

getParameter

public java.lang.Object getParameter(java.lang.String param)
                              throws NoSuchParameterException,
                                     java.security.InvalidParameterException
Gets the value of the specified algorithm parameter.

This method supplies a general-purpose mechanism through which it is possible to get the various parameters of this object. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.

Parameters:
param - the string name of the parameter.
Returns:
the object that represents the parameter value.
Throws:
NullPointerException - if param == null
NoSuchParameterException - if there is no parameter with name param for this implementation.
java.security.InvalidParameterException - if the parameter exists but cannot be read.