Is there an way to programmatically read a file from a TrueCrypt disk into memory?

纵然是瞬间 提交于 2019-12-03 03:21:34

问题


I need to load a file from an umounted TrueCrypt disk into memory. Is there any way to do this programmatically? Does TrueCrypt offer an API?

The way I believe is best for attempting this would be to mount the volume (prompting the user for a password, of course), open the file, and then unmount the volume. Is there a way to do this all automatically?

I am on Windows Vista. I have C#, Python, and Perl readily available.


回答1:


Can you not use the true crypt command line from say 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:


TrueResize includes an open-source C# TrueCrypt library that will allow you to read the encrypted volume (without having to mount it), an additional library includes NTFS support.



来源:https://stackoverflow.com/questions/1315677/is-there-an-way-to-programmatically-read-a-file-from-a-truecrypt-disk-into-memor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!