Temp file that exists only in RAM?

Posted by Auraomega on Stack Overflow See other posts from Stack Overflow or by Auraomega
Published on 2009-02-15T21:08:37Z Indexed on 2010/04/21 17:23 UTC
Read the original article Hit count: 376

Filed under:
|
|
|

I'm trying to write an encrpytion using the OTP method. In keeping with the security theories I need the plain text documents to be stored only in memory and never ever written to a physical drive. The tmpnam command appears to be what I need, but from what I can see it saves the file on the disk and not the RAM.

Using C++ is there any (platform independent) method that allows a file to exist only in RAM? I would like to avoid using a RAM disk method if possible.

Thanks

Edit: Thanks, its more just a learning thing for me, I'm new to encryption and just working through different methods, I don't actually plan on using many of them (esspecially OTP due to doubling the original file size because of the "pad").

If I'm totally honest, I'm a Linux user so ditching Windows wouldn't be too bad, I'm looking into using RAM disks for now as FUSE seems a bit overkill for a "learning" thing.

© Stack Overflow or respective owner

Related posts about c++

Related posts about one-time-password