Comparing version 0.5.2 to 0.5.3
{ | ||
"name" : "bignum", | ||
"version" : "0.5.2", | ||
"version" : "0.5.3", | ||
"description" : "Arbitrary-precision integer arithmetic using OpenSSL", | ||
@@ -5,0 +5,0 @@ "main" : "./index.js", |
@@ -277,6 +277,5 @@ var assert = require('assert'); | ||
/* | ||
exports.and = function () { | ||
for (var i = -10; i < 10; i++) { | ||
for (var j = -10; j < 10; j++) { | ||
for (var i = 0; i < 256; i += 7) { | ||
for (var j = 0; j < 256; j += 7) { | ||
var is = i.toString(); | ||
@@ -291,7 +290,12 @@ var js = j.toString(); | ||
} | ||
assert.eql(bignum.and(bignum('111111', 16), bignum('111111', 16)).toString(16), '111111'); | ||
assert.eql(bignum.and(bignum('111110', 16), bignum('111111', 16)).toString(16), '111110'); | ||
assert.eql(bignum.and(bignum('111112', 16), bignum('111111', 16)).toString(16), '111110'); | ||
assert.eql(bignum.and(bignum('111121', 16), bignum('111111', 16)).toString(16), '111101'); | ||
assert.eql(bignum.and(bignum('111131', 16), bignum('111111', 16)).toString(16), '111111'); | ||
}; | ||
exports.or = function () { | ||
for (var i = -10; i < 10; i++) { | ||
for (var j = -10; j < 10; j++) { | ||
for (var i = 0; i < 256; i += 7) { | ||
for (var j = 0; j < 256; j += 7) { | ||
var is = i.toString(); | ||
@@ -306,8 +310,11 @@ var js = j.toString(); | ||
} | ||
assert.eql(bignum.or(bignum('111111', 16), bignum('111111', 16)).toString(16), '111111'); | ||
assert.eql(bignum.or(bignum('111110', 16), bignum('111111', 16)).toString(16), '111111'); | ||
assert.eql(bignum.or(bignum('111112', 16), bignum('111111', 16)).toString(16), '111113'); | ||
assert.eql(bignum.or(bignum('111121', 16), bignum('111111', 16)).toString(16), '111131'); | ||
}; | ||
*/ | ||
exports.xor = function () { | ||
for (var i = 0; i < 256; i++) { | ||
for (var j = 0; j < 256; j++) { | ||
for (var i = 0; i < 256; i += 7) { | ||
for (var j = 0; j < 256; j += 7) { | ||
var is = i.toString(); | ||
@@ -322,2 +329,6 @@ var js = j.toString(); | ||
} | ||
assert.eql(bignum.xor(bignum('111111', 16), bignum('111111', 16)).toString(), 0); | ||
assert.eql(bignum.xor(bignum('111110', 16), bignum('111111', 16)).toString(), 1); | ||
assert.eql(bignum.xor(bignum('111112', 16), bignum('111111', 16)).toString(), 3); | ||
assert.eql(bignum.xor(bignum('111121', 16), bignum('111111', 16)).toString(), 0x30); | ||
}; | ||
@@ -324,0 +335,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
63373
998
2
304