[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: generate hash code for openldap in java



Hi

Have you BASE64 encoded it?

I've just done this in Java and compared the generated result with what
I get from ldapppaswwd and they match.

I only get it to work for SHA and not for SSHA, beacuse I don't know
what seed to use. 

How it is done? you can find in the FAQmatic, If you have problem
finding the information, send me mail and I will help you.

Bye

Urban Lindberg

Erik Billington wrote:
> 
> I've used ldappasswd to generate hash codes (sha-1) for the userpassword,
> that works fine, but I would prefer to generate the hash in my java code..
> 
> I've tried java.security.MessageDigest to generate the hash, but the hash
> returned isn't supported by openLdap (I think). When I lookup the
> userpassword in ldap it seems to miss the {sha} tag in the beginning of the
> userpassword that identifies the hash code, and I can't authenticate with
> the plain text version of the userpassword.
> Does anyone know a method that generates a hash in java that OpenLdap
> support?
> 
> thanks
> 
> Erik
begin:vcard 
n:Lindberg;Urban
tel;home:060-150108
tel;work:060-641141
x-mozilla-html:FALSE
org:Systech
adr;quoted-printable:;;Box 447=0D=0AS-851 06 Sundsvall;;;;Sweden
adr:;;;;;;
version:2.1
email;internet:urban.lindberg@systech.se
note:070 - 312 91 97
x-mozilla-cpt:;0
fn:Urban Lindberg
end:vcard