Package org.opends.server.util
Class BSDMD5Crypt
java.lang.Object
org.opends.server.util.BSDMD5Crypt
BSD MD5 Crypt algorithm, ported from C.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
crypt
(byte[] plaintextBytes) Encode the supplied password in BSD MD5 crypt form, using a random salt.static String
Encode the supplied password in BSD MD5 crypt form, using provided salt.static String
Getter to the BSD MD5 magic string.static void
Main test method.
-
Method Details
-
crypt
Encode the supplied password in BSD MD5 crypt form, using a random salt.- Parameters:
plaintextBytes
- A password to encode.- Returns:
- An encrypted string.
-
crypt
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
Getter to the BSD MD5 magic string.- Returns:
- the magic string for this crypt algorithm
-
main
Main test method.- Parameters:
argv
- The array of test arguments
-