PeopleCode Encrypt & Decrypt Values

You can use the PeopleSoft classes to encrypt and decrypt values.

To Encrypt a value:

Local JavaObject &SPCipherIn = CreateJavaObject("com.peoplesoft.pt.integrationgateway.common.EncryptPassword");
&vte = "valuetoencrypt";
&encryptedValue = &SPCipherIn.encryptPassword(&vte);

To Decrypt a value:

Local JavaObject &SPCipherOut = CreateJavaObject("psft.pt8.pshttp.PSCipher");
&decryptedValue = &SPCipherOut.decodePassword(&encryptedValue);