1
0
Fork 0
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:
Kalervo Kujala 2011-09-28 22:00:12 +03:00
parent cc5fbab7f9
commit 800fc131b8
4 changed files with 166 additions and 166 deletions

View file

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