return out;
}
public static final ByteList crypt(ByteList salt, ByteList original) {
ByteList buffer = new ByteList(new byte[]{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, false);
byte charZero = salt.bytes[salt.begin];
byte charOne = salt.bytes[salt.begin + 1];
buffer.set(0, charZero);
buffer.set(1, charOne);
int Eswap0 = con_salt[(int) (charZero & 127)];
int Eswap1 = con_salt[(int) (charOne & 127)] << 4;
byte[] key = new byte[8];
for (int i = 0; i < key.length; i++) {
key[i] = (byte) 0;
}
for (int i = 0; i < key.length && i < original.length(); i++) {
int iChar = (int) (original.bytes[original.begin + i] & 255);
key[i] = (byte) (iChar << 1);
}
int[] schedule = des_set_key(key);
int[] out = body(schedule, Eswap0, Eswap1);
byte[] b = new byte[9];
intToFourBytes(out[0], b, 0);
intToFourBytes(out[1], b, 4);
b[8] = 0;
for (int i = 2, y = 0, u = 128; i < 13; i++) {
for (int j = 0, c = 0; j < 6; j++) {
c <<= 1;
if (((int) b[y] & u) != 0) {
c |= 1;
}
u >>>= 1;
if (u == 0) {
y++;
u = 128;
}
buffer.set(i, cov_2char[c]);
}
}
return buffer;
}