1

I have this kind of password hashes in my LDAP database:

userPassword:: MTIzYVBkLSY=

I'm also caching the users password hash in my application so it is not needed to enter it every time. Given this, I want to check if a DN exists with the specified password. What kind of hash algorithm is this? Can I produce the same type of hash in Java?

3 Answers 3

3

That is not a password hash, that seems to be the password, encoded in Base64 format.

If you decode the posted string the you get the password 123aPd-&.

2

That is base64 encoding. try it here

3
  • This does not answer the question. He wants to know the hashing. Since the hash is very short, this cannot be a hash. Not even MD5.
    – Michael-O
    Commented Jul 9, 2012 at 9:10
  • Actually it did answer my question, I just found the attributeType in the schema file, and it is defined as an OctetString. Commented Jul 9, 2012 at 9:12
  • 1
    An OctetString is not a concrete data definition. It just means that it can contain any transparent 8-bit bytes. Hence it contains any binary data.
    – Robert
    Commented Jul 9, 2012 at 9:19
1

I want to check if a DN exists with the specified password.

The way to do that is to perform an LDAP bind with that DN and password as the credentials. In JNDI this is done via LdapContext.reconnect().

What kind of hash algorithm is this?

It doesn't matter, you don't need to know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.