Encrypt and decrypt the storage

The storage can be encrypted either when being created or later.

Encryption during creation

This method doesn't work for fixed-sized storages and also it can't be used in Plain C API.

To encrypt the storage during creation you need to

  1. Create an instance of SolFSStorage class using the default constructor.
  2. Set up properties, including StorageEncryption and StoragePassword.
  3. Call Open method with somCreateNew, somCreateAlways or somOpenAlways as a creation mode.

Encryption of existing storage

  1. Create and/or open the storage
  2. call SetEncryption method. Pass empty value in OldPassword parameter.

Note: encrypting, decrypting or re-encrypting the file takes certain time which can be significant on large files.