Skip to content

Commit

Permalink
Merge pull request #42 from jroper/master
Browse files Browse the repository at this point in the history
Fix for random number generation
  • Loading branch information
havard committed Jun 19, 2011
2 parents 27fe6a7 + 3ffb29a commit 05d89a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openid.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,11 @@ function _generateDiffieHellmanParameters(algorithm)
var a = null;
if(algorithm == 'DH-SHA1')
{
a = new bigint.BigInteger(20, 1, new bigint.SecureRandom());
a = new bigint.BigInteger(160, 1, new bigint.SecureRandom());
}
else
{
a = new bigint.BigInteger(32, 1, new bigint.SecureRandom());
a = new bigint.BigInteger(256, 1, new bigint.SecureRandom());
}
var j = g.modPow(a, p);

Expand Down

0 comments on commit 05d89a3

Please sign in to comment.