Skip to content

dos_encrypt

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Encrypts or unencrypts a file with a specified password.

WARNING: Once a file has been encrypted, it cannot be unencrypted without calling this function and specifying the same password argument. Use this function carefully.

The function generates a series of "mutated" number from the password you specify using a simple (but non-reversible) one-step cellular automation process. This process is similar to the one that drives John Conway's Life, which was described in the October 1970 issue of Scientific American. These mutated numbers are then XORed through the specified file.

Syntax

(dos_encrypt filename password)

Parameters

filename

The source filename.

password

An encrypt/unencrypt password

Returns

A qualified path to the encrypted or unencrypted file if successful.

nil on error.

Example

Command: (dos_encrypt "C:\\Program Files\\Autocad 2006\\Sample\\colorwh.dwg" "password")
"C:\\Program Files\\Autocad 2006\\Sample\\colorwh.dwg"

Clone this wiki locally