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

Method decryptString

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

* Decrypt a string. * * @param data - Encrypted string bytes * @param objectNumber - Object number containing the string * @param generationNumber - Generation number * @returns Decrypted string bytes * @throws {Error} if not authenticated

(data: Uint8Array, objectNumber: number, generationNumber: number)

Source from the content-addressed store, hash-verified

448 * @throws {Error} if not authenticated
449 */
450 decryptString(data: Uint8Array, objectNumber: number, generationNumber: number): Uint8Array {
451 if (!this.authenticated || !this.handlers) {
452 throw new Error("Not authenticated");
453 }
454
455 return this.handlers.stringHandler.decryptString(data, objectNumber, generationNumber);
456 }
457
458 /**
459 * Decrypt a stream.

Callers 2

decryptObjectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected