On Thu, Apr 22, 2010 at 12:22 PM, Stefan Seelmann<[email protected]>wrote:
Please make sure that the password is binary, you could use
StringTools.getBytesUtf8( String ).

That method doesn't seem to exist,
it does, in shared-ldap jar.

but this seems to work:
entry.add("userPassword", password.getBytes());
It's not suffisant : it's system dependent. If your local is not UTF-8, you may get some bad surprise...

Or you can use :

try
{
  entry.add("userPassword", password.getBytes( "UTF-8" )
}
catch ( UnsupportedEncodingException uee )
{
  throw new RuntimeException( uee );
}

--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com


Reply via email to