mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Fixes some static analysis warnings and recommendations
* Useless conditional * Superfluous trailing arguments * Useless assignment to local variable * Misspelled identifier * JSDoc tag for non-existent parameter
This commit is contained in:
parent
d20002b6b1
commit
32ce369d88
9 changed files with 32 additions and 43 deletions
|
@ -1779,17 +1779,15 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
|||
pdfAlgorithm = new PDF17();
|
||||
}
|
||||
|
||||
if (pdfAlgorithm) {
|
||||
if (pdfAlgorithm.checkUserPassword(password, userValidationSalt,
|
||||
userPassword)) {
|
||||
return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption);
|
||||
} else if (password.length && pdfAlgorithm.checkOwnerPassword(password,
|
||||
ownerValidationSalt,
|
||||
uBytes,
|
||||
ownerPassword)) {
|
||||
return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes,
|
||||
ownerEncryption);
|
||||
}
|
||||
if (pdfAlgorithm.checkUserPassword(password, userValidationSalt,
|
||||
userPassword)) {
|
||||
return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption);
|
||||
} else if (password.length && pdfAlgorithm.checkOwnerPassword(password,
|
||||
ownerValidationSalt,
|
||||
uBytes,
|
||||
ownerPassword)) {
|
||||
return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes,
|
||||
ownerEncryption);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue