Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Decoding an encrypted (Perforce) repository password

Gabor Maghera November 10, 2011

I'm working on a plugin which will leverage Perforce's own P4Java API. In order to connect, I've instantiated a com.atlassian.bamboo.repository.perforce.PerforceRepository object, which has a getEncryptedPassword() method. I'd like to decode the password returned by this method, and use it to connect to the Perforce server, using P4Java (Perforce's implementation, not the tek42 one used by Bamboo). I realize this has some security implications.

is this possible to do? Any ideas or suggestions?

Thanks,

Gabor

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Gabor Maghera November 10, 2011

I was able to decrypt it using these two lines:

import com.atlassian.bamboo.security.StringEncrypter;
....
String clrPassword = new StringEncrypter().decrypt(perforceRepository.getEncryptedPassword());

TAGS
AUG Leaders

Atlassian Community Events