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
Interface AgentCipherProvider

All Known Implementing Classes:
  AbstractAgentCipherProvider, AgentDesCsmCipher, AgentNULLCipher, AgentRC5SHA1Cipher

    public interface AgentCipherProvider

Interface for Agent Cipher providers. These implement a specific cipher suite used by the agent.

Method Summary
`int` | `decryptPacket(byte[] agentEncryption, int decryptionOffset, byte[] cleartext)` Decrypts encrypted data starting at the offset provided.
`int` | `encryptPacket(byte[] cleartext, int cleartextLength, int encryptionOffset, byte[] agentEncryption)` This encrypts the bytes passed starting at the offset provided.
`byte` | `getCipherID()` This returns the cipher ID of this provider.
`int` | `getMaxEncryptedSize(int inputSize)` This function provides the maximium amount of expansion encryption adds to a packet.
`void` | `setKey(byte[] keyData)` Sets the key to the byte array provided.

Method Detail

### setKey

    void setKey(byte[] keyData)
                throws AgentCipherException

  Sets the key to the byte array provided.

  Parameters:
    `keyData` - The key to be used for encryption & decryption.
  Throws:
    `AgentCipherException` - If the key is null or the length is not valid.

### decryptPacket

    int decryptPacket(byte[] agentEncryption,
                      int decryptionOffset,
                      byte[] cleartext)
                      throws AgentCipherException

  Decrypts encrypted data starting at the offset provided.

  Parameters:
    `agentEncryption` - The data to be decrypted.
    `decryptionOffset` - The offset at which the encrypted data starts.
    `cleartext` - The cleartext buffer filled upon return.
  Returns:
    The length of the decrypted data.
  Throws:
    `AgentCipherException` - If crypto errors occur or parameters are invalid.

### encryptPacket

    int encryptPacket(byte[] cleartext,
                      int cleartextLength,
                      int encryptionOffset,
                      byte[] agentEncryption)
                      throws AgentCipherException

  This encrypts the bytes passed starting at the offset provided.

  Parameters:
    `cleartext` - The cleartext buffer to be encrypted.
    `cleartextLength` - The length of the cleartext buffer to be encrypted.
    `encryptionOffset` - The offset at which the data should be encrypted.
    `agentEncryption` - The returned encrypted data.
  Returns:
    The length of the encrypted result
  Throws:
    `AgentCipherException` - If crypto errors occur or parameters are invalid.

### getCipherID

    byte getCipherID()

  This returns the cipher ID of this provider.

  Returns:
    The cipher ID.

### getMaxEncryptedSize

    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.

  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.