Issue #2008 - Fix lint errors for src/crypto.js
This commit is contained in:
parent
d59e2105b1
commit
d7b005a79f
@ -1,5 +1,6 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
|
/* globals bytesToString, DecryptStream, error, isInt, isName, Name, PasswordException, stringToBytes */
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -373,7 +374,7 @@ var AES128Cipher = (function AES128CipherClosure() {
|
|||||||
this.buffer = buffer;
|
this.buffer = buffer;
|
||||||
this.bufferLength = bufferLength;
|
this.bufferLength = bufferLength;
|
||||||
this.iv = iv;
|
this.iv = iv;
|
||||||
if (result.length == 0)
|
if (result.length === 0)
|
||||||
return new Uint8Array([]);
|
return new Uint8Array([]);
|
||||||
if (result.length == 1)
|
if (result.length == 1)
|
||||||
return result[0];
|
return result[0];
|
||||||
@ -553,7 +554,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
|||||||
this.algorithm = algorithm;
|
this.algorithm = algorithm;
|
||||||
var keyLength = dict.get('Length') || 40;
|
var keyLength = dict.get('Length') || 40;
|
||||||
if (!isInt(keyLength) ||
|
if (!isInt(keyLength) ||
|
||||||
keyLength < 40 || (keyLength % 8) != 0)
|
keyLength < 40 || (keyLength % 8) !== 0)
|
||||||
error('invalid key length');
|
error('invalid key length');
|
||||||
// prepare keys
|
// prepare keys
|
||||||
var ownerPassword = stringToBytes(dict.get('O'));
|
var ownerPassword = stringToBytes(dict.get('O'));
|
||||||
@ -618,7 +619,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
|||||||
function buildCipherConstructor(cf, name, num, gen, key) {
|
function buildCipherConstructor(cf, name, num, gen, key) {
|
||||||
var cryptFilter = cf.get(name.name);
|
var cryptFilter = cf.get(name.name);
|
||||||
var cfm;
|
var cfm;
|
||||||
if (cryptFilter != null)
|
if (cryptFilter !== null && cryptFilter !== undefined)
|
||||||
cfm = cryptFilter.get('CFM');
|
cfm = cryptFilter.get('CFM');
|
||||||
if (!cfm || cfm.name == 'None') {
|
if (!cfm || cfm.name == 'None') {
|
||||||
return function cipherTransformFactoryBuildCipherConstructorNone() {
|
return function cipherTransformFactoryBuildCipherConstructorNone() {
|
||||||
|
Loading…
Reference in New Issue
Block a user