Hello, I need to build 2 procedures in ASP 3.0. One procedure to encrypt a file, and the other one to decrypt the file. The function must accept the input file as a parameter, locate the file in the client hard drive, and then encrypt it, using the AES algorithm.
I already have the AES library and the functions -->
Function AESEncrypt(sPlain, sPassword)
Function AESDecrypt(sCypher, sPassword)
I'm using them as follows-->
Sub EncriptarArchivo(archivoInput,archivoOutput,password)
const ForReading = 1
const TristateFalse = 0
dim strSearchThis
dim objFS
dim objFile
dim objTS
set objFS = Server.CreateObject("Scripting.FileSystemObject")
set objFile = objFS.GetFile(Server.MapPath(archivoInput))
set objTS = objFile.OpenAsTextStream(ForReading, TristateFalse)
strSearchThis = objTS.Read(objFile.Size)
strPass = trim(password)
strCadena = AESEncrypt(strSearchThis, strPass)
It works OK with SMALL files, but with BiGGeR files, I get a TimeOut response from the Server.
How could I solve that problem?