Password Encryption Options(Object, Object, Object, Object)
Sets the options for encrypting the workbook using a password.
public void SetPasswordEncryptionOptions (object PasswordEncryptionProvider, object PasswordEncryptionAlgorithm, object PasswordEncryptionKeyLength, object PasswordEncryptionFileProperties);
A case sensitive string of the encryption provider.
A case sensitive string of the algorithmic short name (i.e. "RC4").
The encryption key length, which is a multiple of 8 (40 or greater).
true (default) to encrypt file properties.
PasswordEncryptionKeyLength parameters are not independent of each other. A selected encryption provider limits the set of algorithms and key length that can be chosen.
PasswordEncryptionKeyLength parameter there is no inherent limit on the range of the key length. The range is determined by the Cryptographic Service Provider which also determines the cryptographic algorithm.
For information on optional parameters, see Optional Parameters in Office Solutions.