Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get value for LDAP Attribute "userPassword" of type binary using Java1.4

843785Oct 15 2008 — edited Jul 8 2009
Hi,

I am using Sun Java 1.4 and trying to extract the value of an LDAP attribute "userPassword" which is of type binary. While doing this I get an value which is different than the password stored in the IBM Tivoli v5 for eg "[B@61db22" rather the encrypted string in SHA1. Could any help me out with this.

The snap shot of the code which I am using to retrieve the userPassword Attribute is as shown below :

if(attribute.getID().equals("userPassword")){
attribute = attributes.get("userPassword");
String struserPassword = attribute.toString();
//Object strValue = attribute.get();
//logger.info("Object ::"+strValue);
//logger.info("Class of the User Password ::"+strValue.getClass().toString());
String aUserPswd[]= struserPassword.split(":");
for (int i = 1 ; i < aUserPswd.length ; i++) {
String struserPasswordValue = aUserPswd.toString().trim();
fl.setPassword(struserPasswordValue.toString()); // setting the obtained value in xml format
}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2009
Added on Oct 15 2008
3 comments
3,318 views