changeset 22:0f4428febcc6

small cleanup
author casties
date Tue, 03 Apr 2012 11:28:08 +0200
parents 0cd1e7608d25
children a3e324009990
files src/de/mpiwg/itgroup/annotationManager/restlet/AnnotatorResourceImpl.java
diffstat 1 files changed, 0 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/de/mpiwg/itgroup/annotationManager/restlet/AnnotatorResourceImpl.java	Mon Apr 02 19:30:46 2012 +0200
+++ b/src/de/mpiwg/itgroup/annotationManager/restlet/AnnotatorResourceImpl.java	Tue Apr 03 11:28:08 2012 +0200
@@ -7,8 +7,6 @@
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.security.InvalidKeyException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
 import java.security.SignatureException;
 import java.util.ArrayList;
 import java.util.List;
@@ -22,10 +20,7 @@
 import net.oauth.jsontoken.JsonTokenParser;
 import net.oauth.jsontoken.SystemClock;
 import net.oauth.jsontoken.crypto.HmacSHA256Verifier;
-import net.oauth.jsontoken.crypto.SignatureAlgorithm;
 import net.oauth.jsontoken.crypto.Verifier;
-import net.oauth.jsontoken.discovery.VerifierProvider;
-import net.oauth.jsontoken.discovery.VerifierProviders;
 
 import org.apache.log4j.Logger;
 import org.json.JSONArray;
@@ -39,8 +34,6 @@
 import org.restlet.resource.ServerResource;
 import org.restlet.security.User;
 
-import com.google.gson.JsonPrimitive;
-
 import de.mpiwg.itgroup.annotationManager.Constants.NS;
 import de.mpiwg.itgroup.annotationManager.RDFHandling.Annotation;
 
@@ -58,27 +51,6 @@
         return "OPTIONS,GET,POST";
     }
 
-    /**
-     * returns a hex String of a SHA256 digest of text.
-     * 
-     * @param text
-     * @return
-     */
-    public String getSha256Digest(String text) {
-        String digest = null;
-        try {
-            MessageDigest md = MessageDigest.getInstance("SHA-256");
-            md.update(text.getBytes("UTF-8"));
-            byte[] dg = md.digest();
-            digest = DatatypeConverter.printHexBinary(dg);
-        } catch (NoSuchAlgorithmException e) {
-            e.printStackTrace();
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        return digest;
-    }
-    
     public String encodeJsonId(String id) {
         try {
             return DatatypeConverter.printBase64Binary(id.getBytes("UTF-8"));