MCPcopy Create free account
hub / github.com/LibPDF-js/core / tryUserPassword

Method tryUserPassword

src/security/standard-handler.ts:185–192  ·  view source on GitHub ↗

* Try to authenticate with the user password.

(password: Uint8Array)

Source from the content-addressed store, hash-verified

183 * Try to authenticate with the user password.
184 */
185 private tryUserPassword(password: Uint8Array): AuthResult {
186 const { revision } = this.encryptDict;
187
188 if (revision >= 5) {
189 return this.tryUserPasswordR56(password);
190 }
191 return this.tryUserPasswordR2R4(password);
192 }
193
194 /**
195 * Try to authenticate with the owner password.

Callers 1

authenticateMethod · 0.95

Calls 2

tryUserPasswordR56Method · 0.95
tryUserPasswordR2R4Method · 0.95

Tested by

no test coverage detected