Local JavaObject &pscipher = CreateJavaObject("com.peoplesoft.pt.integrationgateway.common.EncryptPassword");
&pwd = "XXXX";
MessageBox(0, "", 0, 0, "Password before encryption " | &pwd);
&encPassword = &pscipher.encryptPassword(&pwd);
&yo = &pscipher.isPasswordEncrypted(&encPassword);
&pscipher = Null;
MessageBox(0, "", 0, 0, "Encrypted Password " | &encPassword | " " | &yo);
Local JavaObject &psCYPHER = CreateJavaObject("psft.pt8.pshttp.PSCipher");
&DecPwd = &psCYPHER.decodePassword(&encPassword);
MessageBox(0, "", 0, 0, "&DecPwd " | &DecPwd);
I created this blog to share tips and explanations that I find useful for Peoplesoft Developers.
5/29/2012
Password Encryption
I found a bit non secured to have cleared passwords in the code, such as when we connect to a FTP using PutAttachement() function. Here is a piece of code that shows how to encrypt and decrypt a password, the Integration Broker way (as available when configuring nodes, on the Connectors tab)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment