project BLF > class TCrypt > method EncryptString


Parameters


icInputStringinputcharacterThe string that has to be encrypted.
ocOutputStringoutputcharacterThe encrypted string
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method BBaseDaemon.AdditionalUpdates
method BSystem.ValidateComponent

QadFinancials
method BDInvoice.VerifySignature


program code (program1/tcrypt.p)

If icInputString = '' Or
   icInputString = ?
Then Do:
    Assign ocOutputString = ''.
    Return.
End.

if com.qad.qra.config.QraConfig:IsEnabled
then vmcrypted = encrypt(icInputString,vaEKey,?,"AES_CBC_128").
else vmcrypted = encrypt(icInputString,vaEKey).

ocOutputString = "B64:" + base64-encode(vmcrypted).

/*clean up*/
set-size(vmcrypted) = 0.
vmcrypted = ?.