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
Community moderators have prevented the ability to post new answers.
I was able to decrypt it using these two lines:
import com.atlassian.bamboo.security.StringEncrypter; .... String clrPassword = new StringEncrypter().decrypt(perforceRepository.getEncryptedPassword());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.