Jump to content
Tuts 4 You

[?]code snippet meaning


Recommended Posts

hi all 

can some one please tell me what does this code do?

private boolean d(String paramString) {
    boolean bool = false;
    byte[] arrayOfByte = paramString.getBytes();
    if (arrayOfByte.length == 26) {
      byte b1 = 0;
      byte b2 = 0;
      while (b1 < 24) {
        b2 = (byte)(b2 ^ arrayOfByte[b1]);
      if ((b2 & 0xF) == -65 + arrayOfByte[25] && (0xF & b2 >> 4) == -65 + arrayOfByte[24])
        bool = true; 
    return bool;


Link to comment

if ((b2 & 0xF) == -65 + arrayOfByte[25] && (0xF & b2 >> 4) == -65 + arrayOfByte[24]) bool = true;

This will check first hex byte tetrade from b2 variable and second hex byte tetrade;
my recommendation is to generate random bytes from index 0 to 24,
from those bytes we get a byte value for b2:
just copy paste the first part of that algorithm:
then just fix arrayOfByte[25] and arrayOfByte[24] so it will return true:
arrayOfByte[25] = (b2 & 0xF) + 65
arrayOfByte[24] = (0xF & b2 >> 4)+ 65


Edited by CodeExplorer
Link to comment
16 hours ago, CodeExplorer said:




thnx for reply

i calculated AXXabcXYUJKXXXXPOLKJXQWEDN which is correct for this func

but clearly there another func at start up cause its not accepted in the next launch

are you familiar with android studio debugging? if not what debugger do you use?

Edited by abbas
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...