1
0
Fork 0
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:
Yury Delendik 2016-05-02 17:34:58 -05:00
parent d20002b6b1
commit 32ce369d88
9 changed files with 32 additions and 43 deletions

View file

@ -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;