Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bignum

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bignum - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

11

index.js

@@ -295,2 +295,13 @@ try {

BigNum.prime = function (bits, safe) {
if ("undefined" === typeof safe) {
safe = true;
}
// Force uint32
bits >>>= 0;
return BigNum.uprime0(bits, !!safe);
};
BigNum.prototype.probPrime = function (reps) {

@@ -297,0 +308,0 @@ var n = this.probprime(reps || 10);

2

package.json
{
"name" : "bignum",
"version" : "0.6.0",
"version" : "0.6.1",
"description" : "Arbitrary-precision integer arithmetic using OpenSSL",

@@ -5,0 +5,0 @@ "main" : "./index.js",

@@ -14,2 +14,3 @@ var assert = require('assert');

assert.eql(Number(bignum('1e+100').toString()), 1e+100);
assert.eql(bignum('1e+100').bitLength(), 333);
assert.eql(Number(bignum('1.23e+45').toString()), 1.23e+45);

@@ -459,2 +460,29 @@ for (var i = 0; i < 10; i++) {

exports.jacobi = function () {
// test case from p. 134 of D. R. Stinson
var b1 = bignum('7411');
var b2 = bignum('9283');
assert.equal(b1.jacobi(b2), -1);
// test case from p. 132 of D. R. Stinson
b1 = bignum('6278');
b2 = bignum('9975');
assert.equal(b1.jacobi(b2), -1);
// test case from p. 74 of Men. Oorsh. Vans.
b1 = bignum('158');
b2 = bignum('235');
assert.equal(b1.jacobi(b2), -1);
// test case from p. 216 of Kumanduri Romero
b1 = bignum('4');
b2 = bignum('7');
assert.equal(b1.jacobi(b2), 1);
// test case from p. 363 of K. R. Rosen
b1 = bignum('68');
b2 = bignum('111');
assert.equal(b1.jacobi(b2), 1);
};
if (process.argv[1] === __filename) {

@@ -461,0 +489,0 @@ assert.eql = assert.deepEqual;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc