[java-identity-provider COMMIT] in /trunk: idp-consent-impl/src/main/java/net/shibboleth/idp/attribute/consent/Consen...

noreply at shibboleth.net noreply at shibboleth.net
Wed Mar 12 15:55:57 EDT 2014


Author: dfisher
Date: Wed Mar 12 15:55:57 2014
New Revision: 5560

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5560&view=rev
Log:
Replace vt-crypt dependency with cryptacular.

Modified:
    trunk/idp-consent-impl/src/main/java/net/shibboleth/idp/attribute/consent/ConsentHelper.java
    trunk/idp-consent-impl/src/test/java/net/shibboleth/idp/attribute/consent/TestData.java
    trunk/idp-tou-impl/pom.xml
    trunk/idp-tou-impl/src/main/java/net/shibboleth/idp/tou/ToUHelper.java
    trunk/idp-tou-impl/src/test/java/net/shibboleth/idp/tou/TestData.java

Modified: trunk/idp-consent-impl/src/main/java/net/shibboleth/idp/attribute/consent/ConsentHelper.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-consent-impl/src/main/java/net/shibboleth/idp/attribute/consent/ConsentHelper.java?rev=5560&r1=5559&r2=5560&view=diff
==============================================================================
--- trunk/idp-consent-impl/src/main/java/net/shibboleth/idp/attribute/consent/ConsentHelper.java (original)
+++ trunk/idp-consent-impl/src/main/java/net/shibboleth/idp/attribute/consent/ConsentHelper.java Wed Mar 12 15:55:57 2014
@@ -34,12 +34,10 @@
 
 import net.shibboleth.idp.attribute.IdPAttribute;
 
+import org.cryptacular.util.CodecUtil;
+import org.cryptacular.util.HashUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
-import edu.vt.middleware.crypt.digest.DigestAlgorithm;
-import edu.vt.middleware.crypt.digest.SHA256;
-import edu.vt.middleware.crypt.util.HexConverter;
 
 /**
  * Consent helper class.
@@ -86,9 +84,6 @@
      * @return Returns the hash of all attribute values.
      */
     public static String hashAttributeValues(final IdPAttribute attribute) {
-
-        // TODO: Make static member?
-        final DigestAlgorithm digestAlgorithm = new SHA256();
 
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
         ObjectOutputStream objectOutputStream;
@@ -102,7 +97,7 @@
             LOGGER.error("Error while converting attribute values into a byte array", e);
             return null;
         }
-        return digestAlgorithm.digest(byteArrayOutputStream.toByteArray(), new HexConverter(true));
+        return CodecUtil.hex(HashUtil.sha256(byteArrayOutputStream.toByteArray()), true);
     }
 
     /**

Modified: trunk/idp-consent-impl/src/test/java/net/shibboleth/idp/attribute/consent/TestData.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-consent-impl/src/test/java/net/shibboleth/idp/attribute/consent/TestData.java?rev=5560&r1=5559&r2=5560&view=diff
==============================================================================
--- trunk/idp-consent-impl/src/test/java/net/shibboleth/idp/attribute/consent/TestData.java (original)
+++ trunk/idp-consent-impl/src/test/java/net/shibboleth/idp/attribute/consent/TestData.java Wed Mar 12 15:55:57 2014
@@ -30,12 +30,11 @@
 import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
 
+import org.cryptacular.util.CodecUtil;
+import org.cryptacular.util.HashUtil;
 import org.joda.time.DateTime;
 import org.opensaml.saml.metadata.resolver.MetadataResolver;
 import org.testng.annotations.DataProvider;
-
-import edu.vt.middleware.crypt.digest.SHA256;
-import edu.vt.middleware.crypt.util.HexConverter;
 
 /**
  *
@@ -78,7 +77,7 @@
     private static String getRandomHash() {
         byte[] bytes = new byte[4096];
         random.nextBytes(bytes);
-        return new SHA256().digest(bytes, new HexConverter(true));
+        return CodecUtil.hex(HashUtil.sha256(bytes), true);
     }
 
     private static DateTime getRandomDate() {

Modified: trunk/idp-tou-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-tou-impl/pom.xml?rev=5560&r1=5559&r2=5560&view=diff
==============================================================================
--- trunk/idp-tou-impl/pom.xml (original)
+++ trunk/idp-tou-impl/pom.xml Wed Mar 12 15:55:57 2014
@@ -50,8 +50,8 @@
             <artifactId>velocity</artifactId>
         </dependency>
         <dependency>
-            <groupId>edu.vt.middleware</groupId>
-            <artifactId>vt-crypt</artifactId>
+            <groupId>org.cryptacular</groupId>
+            <artifactId>cryptacular</artifactId>
         </dependency>
 
         <!-- Provided Dependencies -->
@@ -62,4 +62,4 @@
 
     </dependencies>
     
-</project>
+</project>

Modified: trunk/idp-tou-impl/src/main/java/net/shibboleth/idp/tou/ToUHelper.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-tou-impl/src/main/java/net/shibboleth/idp/tou/ToUHelper.java?rev=5560&r1=5559&r2=5560&view=diff
==============================================================================
--- trunk/idp-tou-impl/src/main/java/net/shibboleth/idp/tou/ToUHelper.java (original)
+++ trunk/idp-tou-impl/src/main/java/net/shibboleth/idp/tou/ToUHelper.java Wed Mar 12 15:55:57 2014
@@ -27,13 +27,10 @@
 
 import net.shibboleth.idp.attribute.IdPAttribute;
 
+import org.cryptacular.util.CodecUtil;

[... 53 lines stripped ...]


More information about the commits mailing list