public static String hashFieldSignature(String signature) { signature = signature.substring(1, signature.length() - 1); if (!signature.startsWith("java")) { signature = "obfuscated/H" + hashData(signature); } return "L" + signature + ";"; }
public static String hashClass(@DottedClassName String className) { if (className.startsWith("java")) { return className; } return "obfuscated.H" + hashData(className); }
static MethodAnnotation obfuscate(MethodAnnotation m) { String className = m.getClassName(); if (className.startsWith("java")) { return m; } String methodName = m.getMethodName(); String methodSignature = m.getMethodSignature(); if ("hashCode".equals(methodName) && "()I".equals(methodSignature) || "equals".equals(methodName) && "(Ljava/lang/Object;)Z".equals(methodSignature) || "compareTo".equals(methodName) && "(Ljava/lang/Object;)I".equals(methodSignature) || "<init>".equals(methodName) || "<clinit>".equals(methodName)) { // don't need to obfuscate method name } else { methodName = hashData(methodName); } MethodAnnotation result = new MethodAnnotation(hashClass(className), methodName, hashMethodSignature(methodSignature), m.isStatic()); result.setDescription(m.getDescription()); return result; }
static StringAnnotation obfuscate(StringAnnotation m) { StringAnnotation result = new StringAnnotation("obfuscated: " + hashData(m.getValue())); result.setDescription(m.getDescription()); return result; }
static LocalVariableAnnotation obfuscate(LocalVariableAnnotation m) { LocalVariableAnnotation result = new LocalVariableAnnotation(hashData(m.getName()), m.getRegister(), m.getPC()); result.setDescription(m.getDescription()); return result; }
static FieldAnnotation obfuscate(FieldAnnotation m) { FieldAnnotation result = new FieldAnnotation(hashClass(m.getClassName()), hashData(m.getFieldName()), hashSignature(m.getFieldSignature()), m.isStatic()); result.setDescription(m.getDescription()); return result; }
a.accept(visitor); result.setOldInstanceHash(hashData(b.getInstanceHash())); result.setHistory(b); return result;
public static String hashFieldSignature(String signature) { signature = signature.substring(1, signature.length() - 1); if (!signature.startsWith("java")) { signature = "obfuscated/H" + hashData(signature); } return "L" + signature + ";"; }
public static String hashClass(@DottedClassName String className) { if (className.startsWith("java")) { return className; } return "obfuscated.H" + hashData(className); }
static MethodAnnotation obfuscate(MethodAnnotation m) { String className = m.getClassName(); if (className.startsWith("java")) { return m; } String methodName = m.getMethodName(); String methodSignature = m.getMethodSignature(); if ("hashCode".equals(methodName) && "()I".equals(methodSignature) || "equals".equals(methodName) && "(Ljava/lang/Object;)Z".equals(methodSignature) || "compareTo".equals(methodName) && "(Ljava/lang/Object;)I".equals(methodSignature) || "<init>".equals(methodName) || "<clinit>".equals(methodName)) { // don't need to obfuscate method name } else { methodName = hashData(methodName); } MethodAnnotation result = new MethodAnnotation(hashClass(className), methodName, hashMethodSignature(methodSignature), m.isStatic()); result.setDescription(m.getDescription()); return result; }
static StringAnnotation obfuscate(StringAnnotation m) { StringAnnotation result = new StringAnnotation("obfuscated: " + hashData(m.getValue())); result.setDescription(m.getDescription()); return result; }
static LocalVariableAnnotation obfuscate(LocalVariableAnnotation m) { LocalVariableAnnotation result = new LocalVariableAnnotation(hashData(m.getName()), m.getRegister(), m.getPC()); result.setDescription(m.getDescription()); return result; }
static FieldAnnotation obfuscate(FieldAnnotation m) { FieldAnnotation result = new FieldAnnotation(hashClass(m.getClassName()), hashData(m.getFieldName()), hashSignature(m.getFieldSignature()), m.isStatic()); result.setDescription(m.getDescription()); return result; }
a.accept(visitor); result.setOldInstanceHash(hashData(b.getInstanceHash())); result.setHistory(b); return result;