From 74585c7c59df39cdea39c5440b2f318fe0579d7f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 23 Apr 2023 10:13:46 +0200 Subject: [PATCH] Remove the unused `PDF20.hash` method This method was added in PR 4938, almost nine years ago, however it doesn't appear to ever have been used. Given the similarities between the `PDF17` and `PDF20` classes, and how they're used, if the `PDF20.hash` method was actually necessary you'd also expect a similiar method in the `PDF17` class. --- src/core/crypto.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/crypto.js b/src/core/crypto.js index 0cd5b7ade..c8e6f2bc9 100644 --- a/src/core/crypto.js +++ b/src/core/crypto.js @@ -1321,10 +1321,6 @@ class PDF20 { return k.subarray(0, 32); } - hash(password, concatBytes, userBytes) { - return this._hash(password, concatBytes, userBytes); - } - checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { const hashData = new Uint8Array(password.length + 56); hashData.set(password, 0);