Retrieve oda password from *.rptdesign [message #253304] |
Thu, 23 August 2007 05:11  |
Eclipse User |
|
|
|
Hi there,
iŽm working an a plain xml-parser (outside the birt api) for report design
files. the goal is to retrieve information about parameters (like name,
default value, format...). it works good, but now iŽm stuck at dynamic
parameters with list values. i canŽt retrieve the odaPassword of the
dataSources:
<encrypted-property name="odaPassword">Ym13</encrypted-property>
going through the birt api i found the class EncryptedPropertyState, but
there was nothing useful to find...
so is there a possibility to decrypt this password?
regards,
sui
|
|
|
[RESOLVED]Re: Retrieve oda password from *.rptdesign [message #253306 is a reply to message #253304] |
Thu, 23 August 2007 07:34  |
Eclipse User |
|
|
|
I figured it out:
The class SimpleEncryptionHelper manages encryption/decryption using the
org.apache.commons.codec.binary.Base64 codec (commons-codec-1.3.jar). The
class implements also the interface
org.eclipse.birt.report.model.api.extension.IEncryptionHelpe r.
decrypt method:
===============
public String decrypt( String string ) {
try {
byte[] data = codec.decode( string.getBytes( CHARSET ) );
System.out.println("++++++++"+ string +" - - "+ string.getBytes(CHARSET)
+" # # "+ codec.decode(string.getBytes(CHARSET)) +" - - "+ new String(
data, CHARSET ));
return new String( data, CHARSET );
} catch ( UnsupportedEncodingException e ) {
assert false;
}
return null;
}
Well it was not easy to find this...
|
|
|
Powered by
FUDForum. Page generated in 0.24260 seconds