Skip to main content

TdxSpreadSheetCustomProtectionInfo.CheckPassword(string) Method

Indicates if the calculated hash or keyword of the specified password is identical to the hash or keyword stored by the spreadsheet protection provider.

Declaration

function CheckPassword(const APassword: string): Boolean;

Parameters

Name Type
APassword string

Returns

Type
Boolean

Remarks

Normally this function, exposed by the IdxSpreadSheetProtectionInfo interface, supports the internal infrastructure and is not intended to be used directly from your code. The CheckPassword function is called internally by:

The CheckPassword function returns True if the hash value calculated for the password passed as the APassword parameter is identical to the hash value of the password used by a spreadsheet protection provider. Otherwise, the function returns False.

The CheckPassword function can use various hash calculation algorithms, depending on which protection provider (i.e., an instance of the TdxSpreadSheetCustomProtectionInfo class descendant assigned to the OptionsProtection.ProtectionInfo property) is used to protect a particular spreadsheet document or worksheet and protection provider settings, if applicable. For more information, refer to the Spreadsheet Document Structure Protection and Worksheet Protection sections of the Password Protection topics.

See Also