@GET
public Response get(@QueryParam("md5") String md5, @QueryParam("d") String newData, @QueryParam("l") int length) {
try {
GeneralDigest digester = new MD5Digest();
DigestExtender extender = new DigestExtender();
byte[] newDigest = extender.extend(digester, Hex.decode(md5), newData.getBytes());
Md5Hash hash = new Md5Hash();
hash.newHash = new String(Hex.encode(newDigest));
hash.pad = URLEncoder.encode(urlEncode(extender.getPad(digester, length)));
return Response.ok().entity(hash).build();
} catch(Exception ex) {
System.err.println(ex.getMessage());
return Response.serverError().build();
}