[Pkg-javascript-commits] [node-diffie-hellman] 50/88: browser: consistent indentation

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:19:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-diffie-hellman.

commit 2ac4672e6436f477ec0963d743d3bf47d31ad894
Author: Daniel Cousens <github at dcousens.com>
Date:   Wed Jan 28 00:03:48 2015 +1100

    browser: consistent indentation
---
 browser.js | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/browser.js b/browser.js
index 12d0830..e7c23a8 100644
--- a/browser.js
+++ b/browser.js
@@ -11,29 +11,29 @@ function getDiffieHellman(mod) {
 }
 
 function createDiffieHellman(prime, enc, generator, genc) {
-	if (Buffer.isBuffer(enc) || (typeof enc === 'string' && ['hex', 'binary', 'base64'].indexOf(enc) === -1)) {
-		genc = generator;
-		generator = enc;
-		enc = undefined;
-	}
-	
-	enc = enc || 'binary';
-	genc = genc || 'binary';
-	generator = generator || new Buffer([2]);
-	
-	if (!Buffer.isBuffer(generator)) {
-		generator = new Buffer(generator, genc);
-	}
-	
-	if (typeof prime === 'number') {
-		return new DH(generatePrime(prime, generator), generator, true);
-	}
-	
-	if (!Buffer.isBuffer(prime)) {
-		prime = new Buffer(prime, enc);
-	}
-	
-	return new DH(prime, generator, true);
+  if (Buffer.isBuffer(enc) || (typeof enc === 'string' && ['hex', 'binary', 'base64'].indexOf(enc) === -1)) {
+    genc = generator;
+    generator = enc;
+    enc = undefined;
+  }
+
+  enc = enc || 'binary';
+  genc = genc || 'binary';
+  generator = generator || new Buffer([2]);
+
+  if (!Buffer.isBuffer(generator)) {
+    generator = new Buffer(generator, genc);
+  }
+
+  if (typeof prime === 'number') {
+    return new DH(generatePrime(prime, generator), generator, true);
+  }
+
+  if (!Buffer.isBuffer(prime)) {
+    prime = new Buffer(prime, enc);
+  }
+
+  return new DH(prime, generator, true);
 }
 
 exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-diffie-hellman.git



More information about the Pkg-javascript-commits mailing list