APIdia Launch Partner
Top Fields Constructors Methods
com.sun.security.auth.module

pack-priv Class Crypt

extends Object
Class Inheritance
Static Imports
java.nio.charset.StandardCharsets.ISO_8859_1

Field Summary

Modifier and TypeField and Description
private byte[]
C

private byte[]
D

private byte[]
E

private static final byte[]
private byte[]
f

private static final byte[]
private static final byte[]
private byte[]
private byte[]
L

private static final byte[]
P

private static final byte[]
private static final byte[]
private static final byte[]
private static final byte[]
private byte[]
private static final byte[][]
S

private static final byte[]
private byte[]

Constructor Summary

AccessConstructor and Description
public
Crypt()

Creates a new Crypt object for use with the crypt method.

Method Summary

Modifier and TypeMethod and Description
public synchronized byte[]

Returns:

A new byte[13] array that contains the encrypted password. The first two characters are the salt.
crypt
(byte[]
the password to "encrypt".
pw
,
byte[]
the salt to use.
salt
)

Implements the libc crypt(3) function.

private void
encrypt(byte[] block, int fake)

public static void
main(String[]
command line arguments.
arg
)

program to test the crypt routine.

private void
setkey(byte[] key)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

Cback to summary
private byte[] C
Dback to summary
private byte[] D
Eback to summary
private byte[] E
e2back to summary
private static final byte[] e2
fback to summary
private byte[] f
FPback to summary
private static final byte[] FP
IPback to summary
private static final byte[] IP
KSback to summary
private byte[] KS
Lback to summary
private byte[] L
Pback to summary
private static final byte[] P
PC1_Cback to summary
private static final byte[] PC1_C
PC1_Dback to summary
private static final byte[] PC1_D
PC2_Cback to summary
private static final byte[] PC2_C
PC2_Dback to summary
private static final byte[] PC2_D
preSback to summary
private byte[] preS
Sback to summary
private static final byte[][] S
shiftsback to summary
private static final byte[] shifts
tempLback to summary
private byte[] tempL

Constructor Detail

Cryptback to summary
public Crypt()

Creates a new Crypt object for use with the crypt method.

Method Detail

cryptback to summary
public synchronized byte[] crypt(byte[] pw, byte[] salt)

Implements the libc crypt(3) function.

Parameters
pw:byte[]

the password to "encrypt".

salt:byte[]

the salt to use.

Returns:byte[]

A new byte[13] array that contains the encrypted password. The first two characters are the salt.

encryptback to summary
private void encrypt(byte[] block, int fake)
mainback to summary
public static void main(String[] arg)

program to test the crypt routine. The first parameter is the cleartext password, the second is the salt to use. The salt should be two characters from the set [a-zA-Z0-9./]. Outputs the crypt result.

Parameters
arg:String[]

command line arguments.

setkeyback to summary
private void setkey(byte[] key)