It's all about the answers!

Ask a question

How can i decrypt password with ObfuscationHelper??


Giuseppe Gravina (379) | 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 com.ibm.team.repository.common.util.ObfuscationHelper (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(CipherCore.java:811)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
at com.sun.crypto.provider.DESCipher.engineDoFinal(DESCipher.java:314)
at javax.crypto.Cipher.doFinal(Cipher.java:2087)
at com.ibm.team.repository.common.util.ObfuscationHelper.decrypt(ObfuscationHelper.java:124)
at com.ibm.team.repository.common.util.ObfuscationHelper.decryptString(ObfuscationHelper.java:99)
at Test.main(Test.java:19)

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)??

Thanks
Giuseppe









3 answers



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

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


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

Hi, 


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
Marc Bauer (111) | answered Feb 21 '19, 3:36 a.m.

Hi,

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?

 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.