fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. /* The class name doesn't have to be Main, as long as the class is not public. */
  4. import com.sun.org.apache.xml.internal.security.utils.Base64;
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. String encodedBytes ="LyJwNh9iPil3MyMSGRhWCCpXBExXAWZBGg1eFjNcShpSCmZxCwJSAC9TBDxbBTRfCw9KRDNbHkxHCzISBwNBAyNcRkxJAWZfBQlHASgSDgkTEilAAwtWRCRTHg9bATUSBANURCRXHg1fASg=";
  10.  
  11. String str="Hello World";
  12. String base64_str=Base64.encode(str.getBytes("UTF-8"));
  13.  
  14. String message = Base64.decode(encodedBytes.getBytes("UTF-8"));
  15. String paramString = "jl3dF2";
  16. int paramInt= 2;
  17. String str= "";
  18.  
  19. System.out.println("----------------- START ---------------------");
  20. for (int i = 0; i < message.length(); i++)
  21. {
  22. int k = paramString.charAt(i % paramString.length());
  23. int j = message.charAt(i);
  24. k &= 1 << paramInt;
  25. str = str + (k ^ j);
  26. }
  27. System.out.println(str);
  28. }
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:4: package com.sun.org.apache.xml.internal.security.utils does not exist
import com.sun.org.apache.xml.internal.security.utils.Base64; 
                                                     ^
Main.java:12: cannot find symbol
symbol  : variable Base64
location: class Main
String base64_str=Base64.encode(str.getBytes("UTF-8")); 
                  ^
Main.java:14: cannot find symbol
symbol  : variable Base64
location: class Main
  String message = Base64.decode(encodedBytes.getBytes("UTF-8")); 
                   ^
Main.java:17: str is already defined in main(java.lang.String[])
  String str= "";
         ^
4 errors
stdout
Standard output is empty