Alex
Alex

Reputation: 36161

How to encrypt a file using EncFS and C++?

EncFS is an open source encrypted file system.

It is really easy to use a compiled encfs executable for Windows and nix systems to encrypt whole directories and mount them.

I just want to encrypt one file programmatically with C++. I couldn't find any libraries on the official website http://www.arg0.net/encfs

How can I do that?

Upvotes: 1

Views: 764

Answers (1)

Maarten Bodewes
Maarten Bodewes

Reputation: 94078

In general, you cannot create a single encrypted file with an encrypted file system, unless you create a filesystem with just one file as math suggested (in a comment).

Alternatives are using the CMS or PGP to create a single encrypted file. Both are container formats that can be used for different forms of encryption. There are other container formats but many are proprietary, CMS and PGP are open and standardized.

Upvotes: 2

Related Questions