Use java.util.Arrays, trying to move away from BouncyCastle

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@40499 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Samuel Langlois
2012-08-16 12:04:28 +00:00
parent 039f818530
commit 1e30ce31c2
2 changed files with 5 additions and 5 deletions

View File

@@ -21,12 +21,12 @@ package org.alfresco.encryption;
import java.io.Serializable;
import java.security.AlgorithmParameters;
import java.security.KeyException;
import java.util.Arrays;
import junit.framework.TestCase;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.util.Pair;
import org.bouncycastle.util.Arrays;
/**
* @since 4.0
@@ -53,7 +53,7 @@ public class EncryptorTest extends TestCase
"fluff",
encryptedPair.getSecond(),
encryptedPair.getFirst());
assertTrue("Encryption round trip failed. ", Arrays.areEqual(bytes, decrypted));
assertTrue("Encryption round trip failed. ", Arrays.equals(bytes, decrypted));
}
public void testBasicBytes_WithKey()
@@ -65,7 +65,7 @@ public class EncryptorTest extends TestCase
"mykey1",
encryptedPair.getSecond(),
encryptedPair.getFirst());
assertTrue("Encryption round trip failed. ", Arrays.areEqual(bytes, decrypted));
assertTrue("Encryption round trip failed. ", Arrays.equals(bytes, decrypted));
}
public void testBasicObject()