SolFSStorage.SetEncryption method
Filter:
Pascal DLL C++ (DLL/Lib) C++ (VCL) C++ (.NET) C# VB.NETOverview
Encrypts or decrypts the storage.
Declaration
[Pascal]
procedure SetEncryption(Encryption: TSolFSEncryption; OldPassword, NewPassword: String);
[DLL]
long _stdcall StorageSetEncryption(unsigned long Storage, unsigned long Encryption,
wchar_t* OldPassword, unsigned long OldPasswordLen, wchar_t* NewPassword, unsigned long NewPasswordLen);
[C++ (DLL/Lib)]
void SetEncryption(SolFSEncryption Encryption,
unsigned short * OldPassword, unsigned short * NewPassword);
[C++ (VCL)]
void __fastcall SetEncryption(TSolFSEncryption Encryption,
WideString OldPassword, WideString NewPassword);
[C++ (.NET)]
void SetEncryption(
SolFSEncryption encryption,
String *oldPassword, String *newPassword
)
[C#]
void SetEncryption(
SolFSEncryption encryption,
String oldPassword, String newPassword
)
[VB.NET]
Sub SetEncryption(
ByVal encryption As SolFSEncryption,
ByVal oldPassword As String,
ByVal newPassword As String)
Parameters
- Encryption - new encryption mode.
- OldPassword - current encryption password if the storage is encrypted or the empty string otherwise.
- NewPassword - the password to be used with new encryption mode (if any).
Values of SolFSEncryption
[Pascal] [DLL] [C++ (VCL)] [C++ (.NET)] [C#] [VB.NET] [ActiveX] [VB]
Value
Meaning
ecNoEncryption
0
Encryption is not used.
ecAES256_SHA256
1
AES (256 bit) is used for encryption and SHA is used for hashing.
ecCustom256
2
Custom encryption is used via callback functions (events).
ecAES256_HMAC256
3
AES (256 bit) is used for encryption and SHA is used for hashing. This mode is recommended for use instead of ecAES256_SHA256.
[DLL] Return values
0 if the function succeeded or one of Error codes if the function failed.
Description
Use SetEncryption to change encryption method or password for the whole-storage encryption.
If you use custom encryption, you must provide handlers for OnDataEncrypt, OnDataDecrypt, OnHashValidate and OnHashCalculate events.
