It's all about the answers!

Ask a question

How can i decrypt password with ObfuscationHelper??

Giuseppe Gravina (369) | asked Feb 06 '17, 1:11 p.m.

 Hi All,

I try to explain my problem:

I have a crypted password created with the command jbe -createPasswordFile FileName.txt of the RTC-BuildSystem-Toolkit-6.0.2. When i try to decrypt this password with the method ObfuscationHelper.decryptString(encodedPass) of the class (imported from the Toolkit Folder) i have this exception:

javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(
at com.sun.crypto.provider.CipherCore.doFinal(
at com.sun.crypto.provider.DESCipher.engineDoFinal(
at javax.crypto.Cipher.doFinal(
at Test.main(

Furthermore, If i use the same method with a password crypted with the  BuildSystem-Toolkit-4.0.6 everything works.

Can you help me please?? How can i decrypt my password (BuildSystem-Toolkit-6.0.2)??


3 answers

permanent link
Marc Bauer (111) | answered Feb 21 '19, 3:36 a.m.


I am facing a similar issue. I generated a passwordFile with the JBE (Version 6.0.5) and try to decrypt the file using the ObfuscationHelper from the java plain api 6.0.5. I had the same observation like Guiseppe. The ObfuscationHelper  is able to read passwordFiles created with 4.0.7, but it can not read passwordFiles with 6.0.5.

Is this intended? How do i read passwordFiles created with 6.0.5 with the java plain API?


permanent link
Giuseppe Gravina (369) | answered Feb 09 '17, 12:26 p.m.


i'm working in java and i noticied that if I use the libraries present in RTC-BuildSystem-Toolkit-6.0.2 to decrypt a password with the class ObfuscationHelper, the method ObfuscationHelper.decryptString(pwdToDecode
wants as input a string encoded with the RTC BuildSystem-Toolkit-4.0.6. This is a problem for me because in a first step of my business process i create a crypted password with the command jbe -createPasswordFile FileName.txt (Toolkit-6.0.2) and in another step I try to decrypt it but the method raises an exception( javax.crypto.BadPaddingException: Given final block not properly padded). 

Can u help me please??

permanent link
Lakshmi Narasimhan T V (4415) | answered Feb 07 '17, 1:48 a.m.

The password file created by JBE is for use within JBE and Build toolkit ant tasks.

Your answer

Register or to post your answer.