fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. System.out.println(a("E1B6B1CAE6B23AC864A5FCEC6E90C81F659422CE01E66FD02C4B333C2B3D7C68BC3173FA"));
  13.  
  14. }
  15.  
  16.  
  17. public static String a(String p8) {
  18. byte[] v8_1 = c(p8);
  19. byte[] v0_1 = new byte[v8_1.length];
  20. int v1_0 = 0;
  21. int v2_0 = 0;
  22. int v3_0 = 0;
  23. while (v1_0 < v8_1.length) {
  24. v2_0 = ((v2_0 + 1) & 255);
  25. byte[] v4_1 = new byte[256];
  26. v3_0 = ((v3_0 + v4_1[v2_0]) & 255);
  27. byte v5_1 = v4_1[v3_0];
  28. v4_1[v3_0] = v4_1[v2_0];
  29. v4_1[v2_0] = v5_1;
  30. v0_1[v1_0] = ((byte)(v4_1[((v4_1[v2_0] + v4_1[v3_0]) & 255)] ^ v8_1[v1_0]));
  31. v1_0++;
  32. }
  33.  
  34. return v0_1.toString();
  35. }
  36.  
  37.  
  38. public static byte[] c(String p8) {
  39. int v0_0 = p8.length();
  40. if ((v0_0 % 2) != 0) {
  41. throw new IllegalArgumentException("");
  42. } else {
  43. byte[] v1_2 = new byte[(v0_0 / 2)];
  44. int v3_0 = 0;
  45. while (v3_0 < v0_0) {
  46. int v4_1 = X(p8.charAt(v3_0));
  47. int v5_2 = X(p8.charAt((v3_0 + 1)));
  48. if ((v4_1 == -1) || (v5_2 == -1)) {
  49. throw new IllegalArgumentException("");
  50. } else {
  51. v1_2[(v3_0 / 2)] = ((byte)((v4_1 * 16) + v5_2));
  52. v3_0 += 2;
  53. }
  54. }
  55.  
  56. return v1_2;
  57. }
  58. }
  59.  
  60. private static int X(char p2) {
  61. if ((48 > p2) || (p2 > 57)) {
  62. int v0_1 = 65;
  63. if ((65 > p2) || (p2 > 70)) {
  64. v0_1 = 97;
  65. if ((97 > p2) || (p2 > 102)) {
  66. return -1;
  67. } else {
  68. }
  69. }
  70. return ((p2 - v0_1) + 10);
  71. } else {
  72. return (p2 - 48);
  73. }
  74. }
  75.  
  76. }
Success #stdin #stdout 0.09s 54660KB
stdin
Standard input is empty
stdout
[B@2ff4acd0