In case one wants to protect VBA applications to make trial(demo) versions and not to expose the scripts, how secure the built in password protection is? Are there any alternatives?
Edit: I'm asking about Excel VBA here.
In case one wants to protect VBA applications to make trial(demo) versions and not to expose the scripts, how secure the built in password protection is? Are there any alternatives?
Edit: I'm asking about Excel VBA here.
Your password security is going to depend largely upon the version of office used. All other Office solutions prior to 2007 can be cracked. Office 2007 requires brute forcing the password. The default encryption mechanism is 128 bit AES.
This means the higher the complexity of the password, the harder to crack. IE - Numbers, special characters, mixing case, etc.
It's not very safe, and can be pretty easily cracked with a tool.
This video shows how it's done.
If you really want to protect source, this may be the way to go for you. For those who may not want to follow the link it's an article regarding developing an XLL add-in for Excel 2007. Xll is a specialized dll for use with MS Excel.
It is not secure. Anyone opening your document in OpenOffice will get immediate access to the code. Open office basically ignores any password protection.
The OO folks have a very good document describing the Excel file format. Section 4.18 (pg. 114) starts the discussion on how protection is handled. Onorio's suggestion on using an add-in will slow someone down, but will not stop a determined hacker.
It's sort of like locking the door to your house. It won't keep out someone determined to get in, but does 'keep honest people honest'.