Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Authentication API v8.1 SP2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.rsa.ace.techservice.cipher
Class AbstractAgentCipherProvider

    java.lang.Object
      com.rsa.ace.techservice.cipher.AbstractAgentCipherProvider

All Implemented Interfaces:
  AgentCipherProvider

Direct Known Subclasses:
  AgentNULLCipher, AgentRC5SHA1Cipher

    public abstract class AbstractAgentCipherProvider

extends java.lang.Object
implements AgentCipherProvider

Abstract Cipher Provider implementation. Provides common functions and data for cipher providers and a ByteBuffer into which and from which the specific provider can encrypt & decrypt.

Constructor Summary
`AbstractAgentCipherProvider()` Constructor.

Method Summary
`int` | `getMajorVersion()` Get the major version of the cipher provider.
`int` | `getMaxEncryptedSize(int inputSize)` This function provides the maximium amount of expansion encryption adds to a packet.
`int` | `getMinorVersion()` Get the minor version of the cipher provider.
`void` | `setBufferArray(byte[] sourceData)` Sets the buffer data to the array provided.
`void` | `setMajorVersion(int majorVersion)` Set the major version of the cipher provider.
`void` | `setMinorVersion(int minorVersion)` Set the minor version of the cipher provider.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.rsa.ace.techservice.cipher.AgentCipherProvider
`decryptPacket, encryptPacket, getCipherID, setKey`

Constructor Detail

### AbstractAgentCipherProvider

    public AbstractAgentCipherProvider()
                                throws AgentCipherException

  Constructor. This initializes the random object. The ByteBuffer is left uninitialized until set with the "setBufferArray()" method.

  Throws:
    `AgentCipherException` - If an instance of the random object cannot be obtained.

Method Detail

### setBufferArray

    public void setBufferArray(byte[] sourceData)
                        throws AgentCipherException

  Sets the buffer data to the array provided. When encrypting data, this is set to the destination buffer. It is set to the source when decrypting. This must be called before the setHeader/setLength or getHeader() methods can be invoked.

  Parameters:
    `sourceData` - The array from which the byte buffer should take the data.
  Throws:
    `AgentCipherException` - If the byte buffer allocation fails.

### getMajorVersion

    public int getMajorVersion()

  Get the major version of the cipher provider.

  Returns:
    The major version.

### getMinorVersion

    public int getMinorVersion()

  Get the minor version of the cipher provider.

  Returns:
    The minor version.

### setMajorVersion

    public void setMajorVersion(int majorVersion)

  Set the major version of the cipher provider.

  Parameters:
    `majorVersion` - The new major version.

### setMinorVersion

    public void setMinorVersion(int minorVersion)

  Set the minor version of the cipher provider.

  Parameters:
    `minorVersion` - The new minor version.

### getMaxEncryptedSize

    public int getMaxEncryptedSize(int inputSize)

  This function provides the maximium amount of expansion encryption adds to a packet. Other cipher providers can override this if they add more overhead.

  Specified by:
    `getMaxEncryptedSize` in interface `AgentCipherProvider`
  Parameters:
    `inputSize` - The size of the cleartext input.
  Returns:
    The number of extra bytes required for the given input packet size.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Authentication API v8.1 SP2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999 - 2011 EMC Corporation. All Rights Reserved.