Package org.opends.server.util
Class BSDMD5Crypt
- java.lang.Object
 - 
- org.opends.server.util.BSDMD5Crypt
 
 
- 
public final class BSDMD5Crypt extends Object
BSD MD5 Crypt algorithm, ported from C. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringcrypt(byte[] plaintextBytes)Encode the supplied password in BSD MD5 crypt form, using a random salt.static Stringcrypt(byte[] plaintextBytes, String salt)Encode the supplied password in BSD MD5 crypt form, using provided salt.static StringgetMagicString()Getter to the BSD MD5 magic string.static voidmain(String[] argv)Main test method. 
 - 
 
- 
- 
Method Detail
- 
crypt
public static String crypt(byte[] plaintextBytes)
Encode the supplied password in BSD MD5 crypt form, using a random salt.- Parameters:
 plaintextBytes- A password to encode.- Returns:
 - An encrypted string.
 
 
- 
crypt
public static String crypt(byte[] plaintextBytes, String salt)
Encode the supplied password in BSD MD5 crypt form, using provided salt.- Parameters:
 plaintextBytes- A password to encode.salt- A salt string of any size, of which only the first 8 bytes will be considered.- Returns:
 - An encrypted string.
 
 
- 
getMagicString
public static String getMagicString()
Getter to the BSD MD5 magic string.- Returns:
 - the magic string for this crypt algorithm
 
 
- 
main
public static void main(String[] argv)
Main test method.- Parameters:
 argv- The array of test arguments
 
 - 
 
 -