CreateKey Method
Creates a derived key.
Syntax
ANSI (Cross Platform) int CreateKey(); Unicode (Windows) INT CreateKey();
- (void)createKey;
#define MID_PBKDF_CREATEKEY 3 IPWORKSENCRYPT_EXTERNAL int IPWORKSENCRYPT_CALL IPWorksEncrypt_PBKDF_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
This method creates a derived key based.
The following properties are applicable when calling this method:
This method populates the Key property with the derived key.Code Example:
Pbkdf pbkdf =
new
Pbkdf();
pbkdf.Password =
"password"
;
pbkdf.Salt =
"0123456789ABCDEF"
;
pbkdf.KeyLength = 4096;
pbkdf.CreateKey();
//Now do something with pbkdf.Key
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)