Below is the encrypt prg.
I included this in the appmain: SET LIBRARY TO (LOCFILE("c:\wconnect\vfpencryption71.fll","FLL"))
if I start the pool and try it. It works great. If I don't use the below function for a while and then try again I get an error saying Too Many Arguments. I restart the pool and it works great as long as I keep using it.
Any ideas?
lcSourceFile = ALLTRIM(vfileloc)+ALLTRIM(vfilename)+"_e" lcDecryptedFile = ALLTRIM(vfileloc)+ALLTRIM(vfilename) ! AES-256 requires exactly a 32-character secret key lcSecretKey = "NOT Shown" ! 2 = AES-256, 1 = Cipher Block Chaining (CBC) Mode lnEncryptionType = 2 lnEncryptionMode = 1 IF DecryptFile(lcSourceFile, lcDecryptedFile, lcSecretKey, lnEncryptionType, lnEncryptionMode, 2) ELSE ENDIF RETURN
STRTOFILE("top of encrypt","c:\temp\enc.txt")
lcSourceFile = ALLTRIM(vfileloc)+ALLTRIM(vfilename)
lcDestFile = ALLTRIM(vfileloc)+ALLTRIM(vfilename)+"_e"
*!* AES-256 requires exactly a 32-character secret key
lcSecretKey = "Hidden"
*!* 2 = AES-256, 1 = Cipher Block Chaining (CBC) Mode
lnEncryptionType = 2
lnEncryptionMode = 1
STRTOFILE("Before encryptfile","c:\temp\enc.txt")
IF EncryptFile(lcSourceFile, lcDestFile, lcSecretKey, lnEncryptionType, lnEncryptionMode, 2)
ELSE
ENDIF
STRTOFILE("After encryptfile","c:\temp\enc.txt")
return