org.alfresco.encryption
Class EncryptionTests

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.encryption.EncryptionTests
All Implemented Interfaces:
junit.framework.Test

public class EncryptionTests
extends junit.framework.TestCase


Constructor Summary
EncryptionTests()
           
 
Method Summary
protected  void createEncryptedProperties(java.util.List nodes)
           
 byte[] generateKeyData()
           
protected  java.security.Key generateSecretKey(java.lang.String keyAlgorithm)
           
protected  org.alfresco.encryption.KeyProvider getKeyProvider(org.alfresco.encryption.KeyMap keys)
           
protected  org.alfresco.encryption.KeyProvider getKeyProvider(org.alfresco.encryption.KeyStoreParameters keyStoreParameters)
           
 void setBackupKeyStoreParameters(org.alfresco.encryption.KeyStoreParameters backupKeyStoreParameters)
           
 void setUp()
           
protected  void tearDown()
           
 void testBootstrapReEncrypt()
           
 void testChangeKeys()
           
 void testChangeKeysCachedCiphers()
           
protected  void testChangeKeysImpl(boolean cacheCiphers)
           
 void testFailedEncryptionWithCachedCiphers()
           
 void testReEncrypt()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EncryptionTests

public EncryptionTests()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

getKeyProvider

protected org.alfresco.encryption.KeyProvider getKeyProvider(org.alfresco.encryption.KeyStoreParameters keyStoreParameters)

setBackupKeyStoreParameters

public void setBackupKeyStoreParameters(org.alfresco.encryption.KeyStoreParameters backupKeyStoreParameters)

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

getKeyProvider

protected org.alfresco.encryption.KeyProvider getKeyProvider(org.alfresco.encryption.KeyMap keys)

createEncryptedProperties

protected void createEncryptedProperties(java.util.List nodes)

generateKeyData

public byte[] generateKeyData()
                       throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

generateSecretKey

protected java.security.Key generateSecretKey(java.lang.String keyAlgorithm)
                                       throws java.security.InvalidKeyException,
                                              java.security.NoSuchAlgorithmException,
                                              java.security.spec.InvalidKeySpecException
Throws:
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException

testReEncrypt

public void testReEncrypt()

testBootstrapReEncrypt

public void testBootstrapReEncrypt()

testChangeKeysImpl

protected void testChangeKeysImpl(boolean cacheCiphers)
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testChangeKeys

public void testChangeKeys()
                    throws java.lang.Throwable
Throws:
java.lang.Throwable

testChangeKeysCachedCiphers

public void testChangeKeysCachedCiphers()
                                 throws java.lang.Throwable
Throws:
java.lang.Throwable

testFailedEncryptionWithCachedCiphers

public void testFailedEncryptionWithCachedCiphers()
                                           throws java.lang.Throwable
Throws:
java.lang.Throwable


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.