Hola,
Estoy intentando obtener la clave de un programa en java, podeis ayudarme:
Se supone que yo conozco s, pero no s1, que es la clave que necesito obtener.
			Estoy intentando obtener la clave de un programa en java, podeis ayudarme:
Código (java) [Seleccionar] 
 private int securityTest(String s, String s1)
    {
        byte abyte0[] = new byte[s1.length()];
        abyte0 = s1.getBytes();
        if(s1.length() != 11)
            return -1;
        for(int i = 0; i < 11; i++)
        {
            if(abyte0[i] >= 97)
            {
                abyte0[i] += -61;
                continue;
            }
            if(abyte0[i] >= 65)
                abyte0[i] += -55;
            else
                abyte0[i] -= 48;
        }
        long l = 0L;
        for(int j = 1; j <= 9; j++)
            l = l * 62L + (long)abyte0[j];
        int k = 0;
        int i1 = 1;
        for(int j1 = 10; j1 >= 0; j1--)
        {
            k += abyte0[j1] * i1;
            i1 ^= 2;
        }
        k %= 62;
        String s2 = String.valueOf(l);
        if(abyte0[0] != 11 || k != 0)
            return -1;
        return s.compareTo(s2) != 0 ? 0 : 1;
    }Se supone que yo conozco s, pero no s1, que es la clave que necesito obtener.