|
Authentication API v8.1 SP2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rsa.ace.techservice.cipher.AbstractAgentCipherProvider
com.rsa.ace.techservice.cipher.AgentRC5SHA1Cipher
public class AgentRC5SHA1Cipher
Agent Cipher Provider for 128-bit RC-5 with a 64-bit SHA1 HMAC. This class is intended to be re-used. It could be maintained in an Agent cache for agents that have the NodeSecret defined. The 'setKey' method is provided for agents that go thru the process of being assigned a node-secret. The encrypt/decrypt methods here are not able to use the base class methods in the manner intended due to the errors in original 'C' agent API.
| Method Summary | |
|---|---|
int |
decryptPacket(byte[] agentEncryption,
int headerOffset,
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 |
setIV(byte[] ivData)
Sets the Initialization Vector (IV). |
void |
setKey(byte[] keyData)
Sets the encrpytion key. |
| Methods inherited from class com.rsa.ace.techservice.cipher.AbstractAgentCipherProvider |
|---|
getMajorVersion, getMinorVersion, setBufferArray, setMajorVersion, setMinorVersion |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setKey(byte[] keyData)
throws AgentCipherException
setKey in interface AgentCipherProviderkeyData - The key to be used.
AgentCipherException - Is thrown for data errors like null key or
invalid length.
public void setIV(byte[] ivData)
throws AgentCipherException
ivData - The Initialization Vector to be used. Must be exactly IV_SIZE bytes.
AgentCipherException - If the IV length is not valid.
public int decryptPacket(byte[] agentEncryption,
int headerOffset,
byte[] cleartext)
throws AgentCipherException
decryptPacket in interface AgentCipherProvideragentEncryption - The data to be decrypted.headerOffset - The offset at which the agent packet (header) starts.cleartext - The cleartext buffer filled upon return.
AgentCipherException - If crypto errors occur or parameters are invalid.
public int encryptPacket(byte[] cleartext,
int cleartextLength,
int encryptionOffset,
byte[] agentEncryption)
throws AgentCipherException
encryptPacket in interface AgentCipherProvidercleartext - 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.
AgentCipherException - If crypto errors occur or parameters are invalid.public byte getCipherID()
getCipherID in interface AgentCipherProviderpublic int getMaxEncryptedSize(int inputSize)
getMaxEncryptedSize in interface AgentCipherProvidergetMaxEncryptedSize in class AbstractAgentCipherProviderinputSize - The size of the cleartext input.
|
Authentication API v8.1 SP2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||