我想从c:\a.txt中读取每行的字符串,然后使用md5函数对字符串加密(md5加密已经实现,就用md5(字符串)表示),如何写代码?谢谢。
------解决方案--------------------
integer li_FileNum, loops, i
long flen, bytes_read, new_pos
blob b, tot_b
li_FileNum = FileOpen("c:\a.txt",LineMode!, Read!, LockRead!)
flen = FileLength(a.txt)
IF flen > 32765 THEN
IF Mod(flen, 32765) = 0 THEN
loops = flen/32765
ELSE
loops = (flen/32765) + 1
END IF
ELSE
loops = 1
END IF
new_pos = 1
FOR i = 1 to loops
bytes_read = FileRead(li_FileNum, b)
tot_b = tot_b + b
NEXT
FileClose(li_FileNum)