Removed Base64 from test

This commit is contained in:
Alex Huang 2012-08-10 06:10:24 -07:00
parent 602ea46d67
commit 14a60c7666
2 changed files with 2 additions and 1756 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@ import java.util.StringTokenizer;
import javax.crypto.Mac; import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.GetMethod;
@ -179,7 +180,7 @@ public class UserCloudAPIExecutor {
mac.init(keySpec); mac.init(keySpec);
mac.update(request.getBytes()); mac.update(request.getBytes());
byte[] encryptedBytes = mac.doFinal(); byte[] encryptedBytes = mac.doFinal();
return URLEncoder.encode(Base64.encodeBytes(encryptedBytes), "UTF-8"); return URLEncoder.encode(Base64.encodeBase64String(encryptedBytes), "UTF-8");
} catch (Exception ex) { } catch (Exception ex) {
System.out.println(ex); System.out.println(ex);
} }