How can i decrypt password with ObfuscationHelper??
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
The password file created by JBE is for use within JBE and Build toolkit ant tasks.
|
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??
|
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
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.