return response.toString();
}
private String[] doPre0x0bEncrypt() throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(password.getBytes());
char[] result = Util.byteArrayToCharArray(md5.digest());
char[] passwordHash = toBase64(result);
md5.reset();
byte[] cryptResult = crypt(password, "$1$_2S43d5f$");
md5.update(cryptResult);
result = Util.byteArrayToCharArray(md5.digest());
char[] cryptHash = toBase64(result);
int sv = seed[15] % 8;
char checksum = 0;
String hashStringP = null, hashStringC = null;
switch (sv % 5) {
case 0 :
checksum = (char) (seed[seed[7] % 16] & 0xff);
hashStringP =
String.valueOf(checksum)
+ new String(passwordHash)
+ yahooId
+ new String(seed);
hashStringC =
String.valueOf(checksum)
+ new String(cryptHash)
+ yahooId
+ new String(seed);
break;
case 1 :
checksum = (char) (seed[seed[9] % 16] & 0xff);
hashStringP =
String.valueOf(checksum)
+ yahooId
+ new String(seed)
+ new String(passwordHash);
hashStringC =
String.valueOf(checksum)
+ yahooId
+ new String(seed)
+ new String(cryptHash);
break;
case 2 :
checksum = (char) (seed[seed[15] % 16] & 0xff);
hashStringP =
String.valueOf(checksum)
+ new String(seed)
+ new String(passwordHash)
+ yahooId;
hashStringC =
String.valueOf(checksum)
+ new String(seed)
+ new String(cryptHash)
+ yahooId;
break;
case 3 :
checksum = (char) (seed[seed[1] % 16] & 0xff);
hashStringP =
String.valueOf(checksum)
+ yahooId
+ new String(passwordHash)
+ new String(seed);
hashStringC =
String.valueOf(checksum)
+ yahooId
+ new String(cryptHash)
+ new String(seed);
break;
case 4 :
checksum = (char) (seed[seed[3] % 16] & 0xff);
hashStringP =
String.valueOf(checksum)
+ new String(passwordHash)
+ new String(seed)
+ yahooId;
hashStringC =
String.valueOf(checksum)
+ new String(cryptHash)
+ new String(seed)
+ yahooId;
break;
}
md5.reset();
md5.update(hashStringP.getBytes());
result = Util.byteArrayToCharArray(md5.digest());
char[] result6 = toBase64(result);
md5.reset();
md5.update(hashStringC.getBytes());
result = Util.byteArrayToCharArray(md5.digest());
char[] result96 = toBase64(result);
String ret[] = new String[2];
ret[0] = new String(result6);
ret[1] = new String(result96);