Announcement

Collapse
No announcement yet.

Crypto BlowfishEncrypt for all files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Crypto BlowfishEncrypt for all files

    Hello!

    I'm trying to use Crypto.BlowfishEncrypt to encrypt all my files from a specific folder but I'm stagnant in this section and I don't have any idea how to solve it.

    Code:
            search_results = File.Find("d:\\", "*.*", true, false);
    
            for index, Fpath in pairs(search_results) do
                Crypto.BlowfishEncrypt(Fpath[1], dTable[1], "mypass");
            end

  • #2
    Hello, I would like to share my solution. Now my question is if is possible to use ProgressBar instead StatusDlg to show the progress?



    Code:
    search_results = File.Find("d:\\", "*", true, false, nil, nil);
    for idFiles, listFiles in pairs(search_results) do
        tbFilePath = String.SplitPath(listFiles);
        isExt = tbFilePath.Extension;
        if isExt ~= ".encrypted" then
            allFiles = listFiles;
            newExt = ".encrypted";
            encryp = String.Concat(allFiles, newExt);
            Crypto.BlowfishEncrypt(allFiles, encryp, "trustno1withthispassword");
            File.Delete(allFiles);
        end
    end

    Comment

    Working...
    X