Crypt Class Methods
In this section, we discuss the crypt class methods. The methods are discussed in alphabetical order.
Syntax
FirstStep()
Description
Use the FirstStep method to access the first step in the encryption chain.
You must use either the FirstStep or GoToStep methods before you use the NextStep or SetParameter methods.
Parameters
None.
Returns
None.
Syntax
GoToStep(StepNum)
Description
Use the GoToStep method to access a specific step in the encryption chain.
You must use either the GoToStep or FirstStep methods before you use the NextStep or SetParameter method.
Parameters
Field or Control |
Definition |
---|---|
StepNum |
Specify the step number that you want to access, as a number. |
Returns
None.
Syntax
LoadLibrary(LibraryFile, LibraryID)
Description
Use the LoadLibrary method to specify the encryption library to be used. This method is generally used when either your underlying library changes (such as, a new version, added algorithms, and so on) or you have your written own library and you need to load the metadata into the PeopleSoft system.
Parameters
Field or Control |
Definition |
---|---|
LibraryFile |
Specify the name of the file containing the encryption library as a string. You do not have to specify a full path name. The delivered OpenSSL library is pspetssl.dll. The delivered PGP library is pspetpgp.dll. |
LibraryID |
Specify the name of the library, as a string. |
Returns
None.
Syntax
NextStep()
Description
Use the NextStep method to access the next step in the encryption chain.
You must use the FirstStep or GoToStep method before using NextStep.
Your program terminates if you call NextStep when you are already at the last step in the encryption chain.
Parameters
None.
Returns
None.
Syntax
Open(ProfileName)
Description
Use the Open method to open the encryption profile identified by ProfileName. You must open an encryption profile before you can add data to the encryption profile. Your program terminates if you specify an encryption profile that doesn't exist.
Parameters
Field or Control |
Definition |
---|---|
ProfileName |
Specify the name of the encryption profile you want to access, as a string. You can store the name of the encryption profile in a field, and specify a fieldname.recordname. |
Returns
None.
Example
Local Crypt &cry;
&cry = CreateObject("Crypt");
&bar = QE_CRYPT_WRK.CRYPT_PRFL_ID;
&cry.Open(&bar);
&cry.UpdateData(QE_CRYPT_WRK.DESCRLONG);
QE_CRYPT_WRK.LARGECHAR = &cry.Result;
Syntax
SetParameter(Name, Value)
Description
Use the SetParameter method to set the parameter specified by Name to a value specified by Value.
You must have already used the FirstStep, NextStep, or GoToStep methods to specify a step before using this method.
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of the parameter that you want to change, as a string. |
Value |
Specify the value for the parameter that you want to change. |
Returns
None.
Syntax
UpdateData(Data)
Description
Use the UpdateData method to add data to the encryption chain. This method can be called multiple times after opening a profile to add data.
Parameters
Field or Control |
Definition |
---|---|
Data |
Specify the data you want to add to the encryption chain, as a string. |
Returns
None.