UdayaKiran Ala wrote:
HI All,
Hi,
 Yes, I can retrieve a password if it is stored as clear text password.
Below is the sample code snippet


Attribute oPwdAttr = attrs.get(ATTR_PASSWORD);

byte[] pwd = (byte[]) oPwdAttr.get();

String sPwd = new String(pwd);
just use this instead :
String sPwd = new String( pwd, "UTF-8" )

otherwise you may get some wrong password if you have not ascii chars into the password, depending on your locale.
System.out.println("password is "+sPwd);


Thanks
Uday


--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to