Creates an encrypted copy of the file named by <in_filename_string> using the integer supplied as a key, naming the encrypted file <out_filename_string>.
Opens the encrypted file using the given integer key and returns a FileStream value that you can then do read calls on, exactly as you can on FileStreams returned from the openFile() function.
encryptFile() and openEncryptedFile() let you encrypt a text file with your own key and open an encrypted file via a key for reading. Among other things, you can use this to write and read an encrypted file containing a hardware lock ID for doing authorization-based piracy protection.
Here is some code that creates an encrypted lock ID file in some authorization process.
The following code can be used to read and check the lock ID (obviously, all this is only safe if the creation and checking scripts are themselves encrypted):