Skip to content

Commit

Permalink
Style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlehn committed Jan 12, 2017
1 parent 19393e9 commit e548bff
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/oids.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ var oids = module.exports = forge.pki.oids = forge.oids = forge.oids || {};
function _IN(id, name) {
oids[id] = name;
oids[name] = id;
};
}
// set id to name mapping only
function _I_(id, name) {
oids[id] = name;
};
}

// algorithm OIDs
_IN('1.2.840.113549.1.1.1', 'rsaEncryption');
Expand Down
2 changes: 1 addition & 1 deletion tests/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function contentServer(callback) {
'[https-server] listening: https://localhost:' +
httpsServer.address().port + '/');
});
};
}

// start servers
contentServer();
Expand Down
1 change: 0 additions & 1 deletion tests/unit/kem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var MD = require('../../lib/md');
var RSA = require('../../lib/rsa');
var UTIL = require('../../lib/util');
var JSBN = require('../../lib/jsbn');
var RANDOM = require('../../lib/random');

(function() {
function FixedSecureRandom(str) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/md5.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var UTIL = require('../../lib/util');

it('should digest "c\'\u00e8"', function() {
var md = MD5.create();
md.update("c\'\u00e8", 'utf8');
md.update('c\'\u00e8', 'utf8');
ASSERT.equal(md.digest().toHex(), '8ef7c2941d78fe89f31e614437c9db59');
});

Expand Down
5 changes: 2 additions & 3 deletions tests/unit/rsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ var MGF = require('../../lib/mgf');
var PSS = require('../../lib/pss');
var RANDOM = require('../../lib/random');
var UTIL = require('../../lib/util');
var support = require('./support');

(function() {
var _pem = {
Expand Down Expand Up @@ -67,7 +66,7 @@ var support = require('./support');
md.update('0123456789abcdef');
var signature = pair.privateKey.sign(md);
ASSERT.ok(pair.publicKey.verify(md.digest().getBytes(), signature));
};
}

// compare pairs
function _pairCmp(pair1, pair2) {
Expand Down Expand Up @@ -515,7 +514,7 @@ var support = require('./support');
var keySize = params.keySize;

it('should rsa encrypt using a ' + keySize + '-bit key', function() {
var message = "it need's to be about 20% cooler"; // it need's better grammar too
var message = 'it need\'s to be about 20% cooler'; // it need's better grammar too

/* First step, do public key encryption */
var key = PKI.publicKeyFromPem(params.publicKeyPem);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sha1.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var UTIL = require('../../lib/util');

it('should digest "c\'\u00e8"', function() {
var md = SHA1.create();
md.update("c\'\u00e8", 'utf8');
md.update('c\'\u00e8', 'utf8');
ASSERT.equal(
md.digest().toHex(), '98c9a3f804daa73b68a5660d032499a447350c0d');
});
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sha256.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var UTIL = require('../../lib/util');

it('should digest "c\'\u00e8"', function() {
var md = SHA256.create();
md.update("c\'\u00e8", 'utf8');
md.update('c\'\u00e8', 'utf8');
ASSERT.equal(
md.digest().toHex(),
'1aa15c717afffd312acce2217ce1c2e5dabca53c92165999132ec9ca5decdaca');
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/sha512.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var ASSERT = require('assert');
var SHA512 = require('../../lib/sha512');
var UTIL = require('../../lib/util');

(function() {
describe('sha512', function() {
Expand Down Expand Up @@ -37,7 +36,7 @@ var UTIL = require('../../lib/util');

it('should digest "c\'\u00e8"', function() {
var md = SHA512.create();
md.update("c\'\u00e8", 'utf8');
md.update('c\'\u00e8', 'utf8');
ASSERT.equal(
md.digest().toHex(),
'9afdc0390dd91e81c63f858d1c6fcd9f949f3fc89dbdaed9e4211505bad63d8e8787797e2e9ea651285eb6954e51c4f0299837c3108cb40f1420bca1d237355c');
Expand Down Expand Up @@ -107,7 +106,7 @@ var UTIL = require('../../lib/util');

it('should digest "c\'\u00e8"', function() {
var md = SHA384.create();
md.update("c\'\u00e8", 'utf8');
md.update('c\'\u00e8', 'utf8');
ASSERT.equal(
md.digest().toHex(),
'382ec8a92d50abf57f7d0f934ff3969d6d354d30c96f1616678a920677867aba49521d2d535c0f285a3c2961c2034ea3');
Expand Down
1 change: 0 additions & 1 deletion webpack-tests.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Copyright 2011-2016 Digital Bazaar, Inc.
*/
const path = require('path');
const webpack = require('webpack');

module.exports = {
entry: {
Expand Down

0 comments on commit e548bff

Please sign in to comment.