mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Use lowercase in function names.
This alleviates the confusion which functions can be instantiated with new.
This commit is contained in:
parent
cc5fbab7f9
commit
800fc131b8
4 changed files with 166 additions and 166 deletions
|
@ -493,16 +493,16 @@ var CipherTransformFactory = (function cipherTransformFactory() {
|
|||
|
||||
function constructor(dict, fileId, password) {
|
||||
var filter = dict.get('Filter');
|
||||
if (!IsName(filter) || filter.name != 'Standard')
|
||||
if (!isName(filter) || filter.name != 'Standard')
|
||||
error('unknown encryption method');
|
||||
this.dict = dict;
|
||||
var algorithm = dict.get('V');
|
||||
if (!IsInt(algorithm) ||
|
||||
if (!isInt(algorithm) ||
|
||||
(algorithm != 1 && algorithm != 2 && algorithm != 4))
|
||||
error('unsupported encryption algorithm');
|
||||
this.algorithm = algorithm;
|
||||
var keyLength = dict.get('Length') || 40;
|
||||
if (!IsInt(keyLength) ||
|
||||
if (!isInt(keyLength) ||
|
||||
keyLength < 40 || (keyLength % 8) != 0)
|
||||
error('invalid key length');
|
||||
// prepare keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue