代码之家  ›  专栏  ›  技术社区  ›  MiffTheFox

有没有办法通过编程将文件从TrueCrypt磁盘读入内存?

  •  10
  • MiffTheFox  · 技术社区  · 16 年前

    我需要将一个文件从装载的TrueCrypt磁盘加载到内存中。有没有任何方法可以通过编程来实现这一点?TrueCrypt是否提供API?

    我认为最好的方法是装载卷(当然,提示用户输入密码),打开文件,然后卸载卷。有没有一种方法可以自动完成这一切?

    我使用的是Windows Vista。我有现成的C#、Python和Perl。

    2 回复  |  直到 6 年前
        1
  •  12
  •   MiffTheFox    16 年前

    true crypt command line 从System.Diagnostics.Process开始?

    using System;
    using System.Diagnostics;
    
    namespace Test {
    
        class TrueCrypeStart
        {
            static void Main(string[] args)
            {
    
                string password = getPassword(...);
                Process tc= new Process();
    
                tc.StartInfo.FileName   = "TrueCrypt.exe";
                tc.StartInfo.Arguments = string.Format("/v \"{0}\" /p \"{1}\" /q", ...mount info ..., password); // for quiet!
    
                tc.Start();
            }
        }
    }
    
        2
  •  0
  •   Tal Aloni    12 年前
    推荐文章