MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / authenticate

Method authenticate

src/__init__.py:4221–4231  ·  view source on GitHub ↗

Decrypt document.

(self, password)

Source from the content-addressed store, hash-verified

4219 return xref
4220
4221 def authenticate(self, password):
4222 """Decrypt document."""
4223 if self.is_closed:
4224 raise ValueError("document closed")
4225 val = mupdf.fz_authenticate_password(self.this, password)
4226 if val: # the doc is decrypted successfully and we init the outline
4227 self.is_encrypted = False
4228 self.is_encrypted = False
4229 self.init_doc()
4230 self.thisown = True
4231 return val
4232
4233 def can_save_incrementally(self):
4234 """Check whether incremental saves are possible."""

Callers 3

open_fileFunction · 0.80
open_fileFunction · 0.80
test_encryptionFunction · 0.80

Calls 1

init_docMethod · 0.95

Tested by 1

test_encryptionFunction · 0.64