|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.jetty.security.UnixCrypt
public class UnixCrypt
Unix Crypt. Implements the one way cryptography used by Unix systems for simple password protection.
Field Summary | |
---|---|
private static byte[] |
A64TOI
|
private static long[][] |
CF6464
|
private static byte[] |
CIFP
|
private static byte[] |
ExpandTr
|
private static long[][] |
IE3264
|
private static byte[] |
IP
|
private static byte[] |
ITOA64
|
private static byte[] |
P32Tr
|
private static byte[] |
PC1
|
private static long[][] |
PC1ROT
|
private static byte[] |
PC2
|
private static long[][][] |
PC2ROT
|
private static byte[] |
Rotates
|
private static byte[][] |
S
|
private static long[][] |
SPE
|
Constructor Summary | |
---|---|
private |
UnixCrypt()
You can't call the constructer. |
Method Summary | |
---|---|
static String |
crypt(String key,
String setting)
Encrypts String into crypt (Unix) code. |
private static long |
des_cipher(long in,
int salt,
int num_iter,
long[] KS)
Returns the DES encrypted code of the given word with the specified environment. |
private static long[] |
des_setkey(long keyword)
Returns the key schedule for the given key. |
private static void |
init_perm(long[][] perm,
byte[] p,
int chars_out)
Initializes the given permutation table with the mapping table. |
static void |
main(String[] arg)
|
private static long |
perm3264(int c,
long[][] p)
Returns the permutation of the given 32-bit code with the specified permutataion table. |
private static long |
perm6464(long c,
long[][] p)
Returns the permutation of the given 64-bit code with the specified permutataion table. |
private static int |
to_six_bit(int num)
Returns the transposed and split code of a 24-bit code into a 4-byte code, each having 6 bits. |
private static long |
to_six_bit(long num)
Returns the transposed and split code of two 24-bit code into two 4-byte code, each having 6 bits. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final byte[] IP
private static final byte[] ExpandTr
private static final byte[] PC1
private static final byte[] Rotates
private static final byte[] PC2
private static final byte[][] S
private static final byte[] P32Tr
private static final byte[] CIFP
private static final byte[] ITOA64
private static byte[] A64TOI
private static long[][] PC1ROT
private static long[][][] PC2ROT
private static long[][] IE3264
private static long[][] SPE
private static long[][] CF6464
Constructor Detail |
---|
private UnixCrypt()
Method Detail |
---|
private static int to_six_bit(int num)
private static long to_six_bit(long num)
private static long perm6464(long c, long[][] p)
private static long perm3264(int c, long[][] p)
private static long[] des_setkey(long keyword)
private static long des_cipher(long in, int salt, int num_iter, long[] KS)
private static void init_perm(long[][] perm, byte[] p, int chars_out)
public static String crypt(String key, String setting)
key
- the key to be encryptedsetting
- the salt to be used
public static void main(String[] arg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |