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
- Create an instance of SolFSStorage class using the default constructor.
- Set up properties, including StorageEncryption and
- Call Open method with somCreateNew, somCreateAlways or somOpenAlways as a creation mode.
Encryption of existing storage
- Create and/or open the storage
- 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.