Authentication
API v8.1 SP2

com.rsa.ace.techservice.cipher
Class AgentCipherTest

java.lang.Object
  extended by com.rsa.ace.techservice.cipher.AgentCipherTest

public class AgentCipherTest
extends java.lang.Object

Agent Cipher Unit Test.


Method Summary
 void cipherRoundTripTest64(AgentCipherProvider cipher, byte[] message, int encryptionStart)
          Agent Cipher 64-bit key Round-Trip Test.
 void cipherTest64(byte[] message, int encryptionStart)
          Agent Cipher 64-bit key Test.
 void MACTest(byte[] msgBytes)
          Agent Cipher MAC Test.
static void main(java.lang.String[] args)
          Agent Cipher Unit Test Main.
 void testCipher64()
          Agent Cipher 64-bit Test Driver.
 void testMAC()
          Agent MAC Test Driver.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cipherTest64

public void cipherTest64(byte[] message,
                         int encryptionStart)
                  throws AgentCipherException
Agent Cipher 64-bit key Test.

Throws:
AgentCipherException

cipherRoundTripTest64

public void cipherRoundTripTest64(AgentCipherProvider cipher,
                                  byte[] message,
                                  int encryptionStart)
                           throws AgentCipherException
Agent Cipher 64-bit key Round-Trip Test. This encrypts, decrypts and compares the results. As a test, the destination buffer is exactly the correct size to verify that the encryption API doesn't use extra memory past what is required.

Parameters:
message - The test message.
encryptionStart - The offset at which the message should start to be encrypted.
Throws:
AgentCipherException - For any number of reasons.

testCipher64

public void testCipher64()
                  throws AgentCipherException
Agent Cipher 64-bit Test Driver.

Throws:
AgentCipherException

MACTest

public void MACTest(byte[] msgBytes)
             throws AgentCipherException
Agent Cipher MAC Test. This method generates a MAC for the message passed and then calls the verify method to check the MAC verification. It also performs other check that if either the MAC or the input data is modified, the verification fails.

Parameters:
msgBytes - The test message to be MACed and verified.
Throws:
AgentCipherException

testMAC

public void testMAC()
             throws AgentCipherException
Agent MAC Test Driver.

Throws:
AgentCipherException

main

public static void main(java.lang.String[] args)
Agent Cipher Unit Test Main.

Parameters:
args - Test command line arguments. Currently none are defined.

Authentication
API v8.1 SP2

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