Skip to main content
gamedev.net
🔒 Locked

EncryptFile

Started by levjs Sep 1, 2006 at 5:20 PM 3 replies 750+ views
Original Post
levjs
levjs
Hi, What exactly does encrypting a file with EncryptFile do? Does it change the file in any way or protect it? Thanks Levi
Zao
Zao
The documentation over at MSDN seems to outline what it does pretty fine.

It encrypts the file itself and any streams it contains. A file encryption function that didn't encrypt the file would be rather useless.
To make it is hell. To fail is divine.
levjs
levjs
I'm asking more into the heart of what is encrypting a file. Obviously encrptfile encrypts the file [smile], but what is encrypting a file? What does it do to it?
Zao
Zao
When you encrypt something, you run whatever data you have through an encryption algorithm together with a key. In order to retrieve the original data you need to feed the data through a decryption algorithm together with the correct key.

This way, any data stored on disk or in transit over networks will be practically unusable to anyone who hasn't got the key.

As for the specific semantics around the win32 API function EncryptFile, I believe that the key is related to your user account and supported by your file system, so only users who have rights to access the file can decrypt it.

There's plenty of things to read over at wikipedia if you're interested in how encryption algorithms work, as well as many good books, like Applied Cryptography.
To make it is hell. To fail is divine.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.