[java-identity-provider COMMIT] in /trunk/idp-tou-impl: pom.xml src/main/java/net/shibboleth/idp/tou/ToUHelper.java
noreply at shibboleth.net
noreply at shibboleth.net
Fri Feb 28 11:19:33 EST 2014
Author: dfisher
Date: Fri Feb 28 11:19:33 2014
New Revision: 5494
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5494&view=rev
Log:
Revert the vt-crypt -> cryptacular change until I fix the tests.
Modified:
trunk/idp-tou-impl/pom.xml
trunk/idp-tou-impl/src/main/java/net/shibboleth/idp/tou/ToUHelper.java
Modified: trunk/idp-tou-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-tou-impl/pom.xml?rev=5494&r1=5493&r2=5494&view=diff
==============================================================================
--- trunk/idp-tou-impl/pom.xml (original)
+++ trunk/idp-tou-impl/pom.xml Fri Feb 28 11:19:33 2014
@@ -50,8 +50,8 @@
<artifactId>velocity</artifactId>
</dependency>
<dependency>
- <groupId>org.cryptacular</groupId>
- <artifactId>cryptacular</artifactId>
+ <groupId>edu.vt.middleware</groupId>
+ <artifactId>vt-crypt</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=5494&r1=5493&r2=5494&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 Fri Feb 28 11:19:33 2014
@@ -27,10 +27,13 @@
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.Converter;
+import edu.vt.middleware.crypt.util.HexConverter;
/**
* Terms of use helper class.
@@ -129,7 +132,10 @@
* @return Returns the terms of use fingerprint.
*/
public static String getToUFingerprint(final ToU tou) {
- return CodecUtil.hex(HashUtil.sha256(tou.getText().getBytes()), true);
+ final DigestAlgorithm digestAlgorithm = new SHA256();
+ final Converter converter = new HexConverter(true);
+
+ return digestAlgorithm.digest(tou.getText().getBytes(), converter);
}
/**
More information about the commits
mailing list