Skip to content
This repository

Cleanups #39

Merged
merged 2 commits into from over 1 year ago

2 participants

Brian Warner Ben Adida
Brian Warner
Owner
warner commented July 27, 2012

remove dead code, fix some no-newline-at-EOFs

Ben Adida benadida merged commit 58fbe1f into from July 27, 2012
Ben Adida benadida closed this July 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
2  .gitignore
@@ -5,4 +5,4 @@ bidbundle.js
5 5
 node_modules
6 6
 bidbundle.js
7 7
 bidbundle-min.js
8  
-bidbundle-min.js.gz
  8
+bidbundle-min.js.gz
3  README.md
Source Rendered
@@ -210,4 +210,5 @@ or, to use the pre-versioning format:
210 210
 
211 211
 or, to go back to the library default:
212 212
 
213  
-     jwcrypto.setDataFormatVersion();
  213
+     jwcrypto.setDataFormatVersion();
  214
+
36  lib/algs/ds.js
@@ -95,42 +95,6 @@ function randomNumberMod(q, rng) {
95 95
   return new BigInteger(q.bitLength() + 64, rng).mod(q.subtract(BigInteger.ONE)).add(BigInteger.ONE);
96 96
 }
97 97
 
98  
-function serializeParamsToObject(keysize, obj) {
99  
-  // XXX branch on version.DATA_FORMAT_VERSION
100  
-  
101  
-  // add other parameters, because we want these keys to be portable
102  
-  var params = getParams(keysize);
103  
-  obj.p = params.p.toString(16);
104  
-  obj.q = params.q.toString(16);
105  
-  obj.g = params.g.toString(16);
106  
-}
107  
-
108  
-// this function will throw an exception if the parameters don't
109  
-// match what's expected in KEYSIZES
110  
-function keysizeFromObject(obj) {
111  
-  var p = new BigInteger(obj.p, 16);
112  
-  var q = new BigInteger(obj.q, 16);
113  
-  var g = new BigInteger(obj.g, 16);
114  
-
115  
-  var keysize = _getKeySizeFromBitlength(p.bitLength());
116  
-  var params = getParams(keysize);
117  
-
118  
-  // we don't force this to be our parameters, no need
119  
-
120  
-  /*
121  
-  // check!
122  
-  if (!p.equals(params.p))
123  
-    throw "bad p";
124  
-
125  
-  if (!q.equals(params.q))
126  
-    throw "bad q";
127  
-
128  
-  if (!g.equals(params.g))
129  
-    throw "bad g"; */
130  
-
131  
-  return keysize;
132  
-}
133  
-
134 98
 function generate(keysize, rng, doneCB) {
135 99
   var params = getParams(keysize);
136 100
   if (!params)
2  lib/jwcrypto.js
@@ -182,4 +182,4 @@ exports.cert = require("./cert");
182 182
 
183 183
 // versioning
184 184
 exports.getDataFormatVersion = version.getDataFormatVersion;
185  
-exports.setDataFormatVersion = version.setDataFormatVersion;
  185
+exports.setDataFormatVersion = version.setDataFormatVersion;
2  test/vectors-test.js
@@ -343,4 +343,4 @@ BACKED_ASSERTIONS.forEach(function(backedAssertionObject) {
343 343
   addBackedAssertionBatch(backedAssertionObject);
344 344
 });
345 345
 
346  
-suite.export(module);
  346
+suite.export(module);
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.