@@ -0,0 +1,632 @@
+import javax.servlet.http.HttpServletRequest;%0Aimport java.nio.charset.StandardCharsets;%0Aimport java.security.MessageDigest;%0Aimport java.lang.String;%0A%0A%0Apublic class Test %7B%0A    private boolean UnsafeComparison(HttpServletRequest request) %7B%0A        String Key = %22secret%22;%0A        return Key.equals(request.getHeader(%22X-Auth-Token%22));        %0A    %7D%0A%0A    private boolean safeComparison(HttpServletRequest request) %7B%0A          String token = request.getHeader(%22X-Auth-Token%22);%0A          String Key = %22secret%22; %0A          return MessageDigest.isEqual(Key.getBytes(StandardCharsets.UTF_8), token.getBytes(StandardCharsets.UTF_8));%0A    %7D%0A%0A%7D%0A

Create Test.java