package pa;
public class Test
{
public static void encode(byte[] in, byte[] out, int password)
{
int len = in.length;
int seed = password ^ 0xeee3a8df;
for (int i = 0 ; i < len; ++i) {
byte a = (byte)( ( in[i] ^ seed ) >>> 3 );
byte b = (byte)( ( ( ((int)in[i]) << 12 ) ^ seed ) >>> (12-5) );
a &= 0x1f;
b &= 0xe0;
out[i] = (byte)(a | b);
seed = (((seed << 7) ^ seed ^ out[i]) + 84723701);
}
}
public static void decode(byte[] in, byte[] out, int password)
{
int len = in.length;
int seed = password ^ 0xeee3a8df;
for (int i = 0 ; i < len; ++i) {
// fill the code here
byte a=(byte)(in[i] & 0x1f);
a=(byte)(a<<3);
a=(byte)(a^seed);
a=(byte)(a&248);
byte b=(byte)(in[i]&0xe0);
int temp=(int)b;
temp=temp<<7;
temp=temp^seed;
temp=temp>>12;
b=(byte)temp;
b=(byte)(b&7);
out[i]=(byte)(a | b);
seed = (((seed << 7) ^ seed ^ in[i]) + 84723701);
}
}
public static void main(String [] args) throws Exception
{
int password = 0xf6be2404;
byte[] buf1 = {98, 127, 63, 59, -43, 103, -91, 80, 88, -60, -39, 18, -81, -10, 101, -23, -24, -96, -5, 56, 47, 50, -1, -69, -85, 77, -123, 35, 81, 104, -67, 110, 97, 51, 42, 62, -108, -88, -109, -45, 63, -81, 106, -118, 86, -88, 31, -120, 107, 106, -104, 114, -73, 30, 96, 97, 48, -53, 114, -45, -86, 44, -62, 1, -53, 81, 90, -7, 19, -57, 109, 86, };
byte[] buf2 = new byte[buf1.length];
decode(buf1, buf2, password);
System.out.println(new String(buf2, "GBK"));
System.out.print("end");
}
}
搜狗浏览器是目前速度最快、最稳定、最安全、功能最强大的“双核”浏览器!!
public class Test
{
public static void encode(byte[] in, byte[] out, int password)
{
int len = in.length;
int seed = password ^ 0xeee3a8df;
for (int i = 0 ; i < len; ++i) {
byte a = (byte)( ( in[i] ^ seed ) >>> 3 );
byte b = (byte)( ( ( ((int)in[i]) << 12 ) ^ seed ) >>> (12-5) );
a &= 0x1f;
b &= 0xe0;
out[i] = (byte)(a | b);
seed = (((seed << 7) ^ seed ^ out[i]) + 84723701);
}
}
public static void decode(byte[] in, byte[] out, int password)
{
int len = in.length;
int seed = password ^ 0xeee3a8df;
for (int i = 0 ; i < len; ++i) {
// fill the code here
byte a=(byte)(in[i] & 0x1f);
a=(byte)(a<<3);
a=(byte)(a^seed);
a=(byte)(a&248);
byte b=(byte)(in[i]&0xe0);
int temp=(int)b;
temp=temp<<7;
temp=temp^seed;
temp=temp>>12;
b=(byte)temp;
b=(byte)(b&7);
out[i]=(byte)(a | b);
seed = (((seed << 7) ^ seed ^ in[i]) + 84723701);
}
}
public static void main(String [] args) throws Exception
{
int password = 0xf6be2404;
byte[] buf1 = {98, 127, 63, 59, -43, 103, -91, 80, 88, -60, -39, 18, -81, -10, 101, -23, -24, -96, -5, 56, 47, 50, -1, -69, -85, 77, -123, 35, 81, 104, -67, 110, 97, 51, 42, 62, -108, -88, -109, -45, 63, -81, 106, -118, 86, -88, 31, -120, 107, 106, -104, 114, -73, 30, 96, 97, 48, -53, 114, -45, -86, 44, -62, 1, -53, 81, 90, -7, 19, -57, 109, 86, };
byte[] buf2 = new byte[buf1.length];
decode(buf1, buf2, password);
System.out.println(new String(buf2, "GBK"));
System.out.print("end");
}
}
搜狗浏览器是目前速度最快、最稳定、最安全、功能最强大的“双核”浏览器!!