Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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









0 votes



3 answers

Permanent link

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

0 votes


Permanent link

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


0 votes


Permanent link

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?

 

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,221

Question asked: Feb 06 '17, 1:11 p.m.

Question was seen: 3,800 times

Last updated: Feb 21 '19, 3:36 a.m.

Confirmation Cancel Confirm