Table of Contents

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

protection DocumentProtection

The protection settings.

password string

The password to check.

limits ResourceLimits

The 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.