public final class BSDMD5Crypt extends Object
Constructor and Description |
---|
BSDMD5Crypt() |
Modifier and Type | Method and Description |
---|---|
static String |
crypt(org.forgerock.opendj.ldap.ByteSequence password)
Encode the supplied password in BSD MD5 crypt form, using
a random salt.
|
static String |
crypt(org.forgerock.opendj.ldap.ByteSequence password,
String salt)
Encode the supplied password in BSD MD5 crypt form, using
provided salt.
|
static String |
getMagicString()
Getter to the BSD MD5 magic string.
|
static void |
main(String[] argv)
Main test method.
|
public BSDMD5Crypt()
public static String crypt(org.forgerock.opendj.ldap.ByteSequence password) throws NoSuchAlgorithmException
password
- A password to encode.NoSuchAlgorithmException
- If the MD5 algorithm is not supported.public static String crypt(org.forgerock.opendj.ldap.ByteSequence password, String salt) throws NoSuchAlgorithmException
password
- A password to encode.salt
- A salt string of any size, of which only the first
8 bytes will be considered.NoSuchAlgorithmException
- If the MD5 algorithm is not supported.public static String getMagicString()
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.