Class AESParameters

java.lang.Object
java.security.AlgorithmParametersSpi
com.ibm.crypto.hdwrCCA.provider.AESParameters

public final class AESParameters extends AlgorithmParametersSpi
This class implements the parameters (IV) used with the AES algorithm in feedback-mode. IV is defined in the standards as follows:

 IV ::= OCTET STRING  -- 16 octets
 

This documentation describes a Service Provider Interface. It is provided for implementation insight only. This class is not intended to be called directly by application developers. Please consult the 'Java Cryptography Architecture Standard' for details on how to use this interface through a public standard class.

Note:
Certain operations may require specific hardware or software, or specific key types. See the rest of this document and the z/OS Unique Considerations Hardware Crypto Reference Guide for more details. Unsupported operations and/or combinations may result in a RuntimeException Hardware Error.
For public interface details, consult the JCE API documentation for java.security.AlgorithmParameters.
  • Constructor Details

    • AESParameters

      public AESParameters()
      Constructor
  • Method Details

    • engineInit

      protected void engineInit(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecException
      Initializes this parameters object using the parameters specified in paramSpec.
      Specified by:
      engineInit in class AlgorithmParametersSpi
      Parameters:
      paramSpec - the AES parameter specification containing the initialization vector
      Throws:
      InvalidParameterSpecException - if the given parameter specification is inappropriate for the initialization of this parameter object, or if the initialization vector is not 16 bytes long.
    • engineInit

      protected void engineInit(byte[] encoded) throws IOException
      Imports the DER encoded parameters and decodes the initialization vector.
      Specified by:
      engineInit in class AlgorithmParametersSpi
      Parameters:
      encoded - the DER encoded initialization vector
      Throws:
      IOException - on decoding errors or if the initialization vector is not 16 bytes long.
    • engineInit

      protected void engineInit(byte[] encoded, String decodingMethod) throws IOException
      Imports the the DER encoded parameters and decodes the initialization vector. The specified decodingMethod is ignored.
      Specified by:
      engineInit in class AlgorithmParametersSpi
      Parameters:
      encoded - the DER encoded initialization vector
      decodingMethod - the name of the decoding format, which will be ignored
      Throws:
      IOException - on decoding errors or if the initialization vector is not 16 bytes long.
    • engineGetParameterSpec

      protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException
      Returns a (transparent) specification of this parameters object. paramSpec identifies the specification class in which the parameters should be returned.
      Specified by:
      engineGetParameterSpec in class AlgorithmParametersSpi
      Parameters:
      paramSpec - the specification class in which the parameters should be returned. Should be javax.crypto.spec.IvParameterSpec or its subclass
      Throws:
      InvalidParameterSpecException - if the requested parameter specification is inappropriate for this parameter object.
    • engineGetEncoded

      protected byte[] engineGetEncoded() throws IOException
      Returns the initialization vector in DER encoding format.
      Specified by:
      engineGetEncoded in class AlgorithmParametersSpi
      Returns:
      DER encoded initialization vector.
      Throws:
      IOException - on encoding errors.
    • engineGetEncoded

      protected byte[] engineGetEncoded(String encodingMethod) throws IOException
      Returns the initialization vector in DER encoding format.
      Specified by:
      engineGetEncoded in class AlgorithmParametersSpi
      Parameters:
      encodingMethod - the name of the encoding format, which will be ignored
      Returns:
      DER encoded initialization vector.
      Throws:
      IOException - on encoding errors.
    • engineToString

      protected String engineToString()
      Returns a formatted string describing the parameters.
      Specified by:
      engineToString in class AlgorithmParametersSpi
      Returns:
      a formatted string describing the parameters.