You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/02/20 00:44:24 UTC
svn commit: r912037 -
/incubator/wookie/trunk/src/org/apache/wookie/util/HashGenerator.java
Author: scottbw
Date: Fri Feb 19 23:44:23 2010
New Revision: 912037
URL: http://svn.apache.org/viewvc?rev=912037&view=rev
Log:
Removed dependency on Sun Base64 encoder with Apache Commons Codec. See WOOKIE-106
Modified:
incubator/wookie/trunk/src/org/apache/wookie/util/HashGenerator.java
Modified: incubator/wookie/trunk/src/org/apache/wookie/util/HashGenerator.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/util/HashGenerator.java?rev=912037&r1=912036&r2=912037&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/util/HashGenerator.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/util/HashGenerator.java Fri Feb 19 23:44:23 2010
@@ -21,10 +21,9 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
+import org.apache.commons.codec.binary.Base64;
import org.apache.wookie.exceptions.SystemUnavailableException;
-import sun.misc.BASE64Encoder;
-
/**
* A class for generating digests/hashing
* @author Paul Sharples
@@ -71,7 +70,7 @@
}
byte raw[] = md.digest(); //step 4
- String hash = (new BASE64Encoder()).encode(raw);
+ String hash = new String((new Base64()).encode(raw));
return hash; //step 6
}