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.5.2 to 0.5.3

2

package.json
{
"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

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