Method VerifyDocumentProtection
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
VerifyDocumentProtection(DocumentProtection, string, ResourceLimits?)
Checks a password against the document-protection hash a document records.
public static bool VerifyDocumentProtection(DocumentProtection protection, string password, ResourceLimits? limits = null)
Parameters
protectionDocumentProtectionThe protection settings.
passwordstringThe password to check.
limitsResourceLimitsThe resource caps, or null for the defaults.
Returns
- bool
true when the password matches. false when it does not, and when the document records no hash to check it against — a document with no recorded password is not one that every password opens.
Exceptions
- ArgumentNullException
An argument is null.