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

ffjavascript

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ffjavascript - npm Package Compare versions

Comparing version 0.2.56 to 0.2.57

2

package.json
{
"name": "ffjavascript",
"type": "module",
"version": "0.2.56",
"version": "0.2.57",
"description": "Finite Field Library in Javascript",

@@ -6,0 +6,0 @@ "main": "./build/main.cjs",

@@ -100,3 +100,3 @@ /* global BigInt */

i += 4;
} else if (i + 4 <= buff.length) {
} else if (i + 2 <= buff.length) {
res += BigInt(buffV.getUint16(i, true)) << BigInt(i * 8);

@@ -127,7 +127,7 @@ i += 2;

} else if (o + 2 <= len) {
buffV.setUint16(Number(o, r & BigInt(0xffff)), true);
buffV.setUint16(o, Number(r & BigInt(0xffff)), true);
o += 2;
r = r >> BigInt(16);
} else {
buffV.setUint8(Number(o, r & BigInt(0xff)), true);
buffV.setUint8(o, Number(r & BigInt(0xff)), true);
o += 1;

@@ -134,0 +134,0 @@ r = r >> BigInt(8);

@@ -30,2 +30,20 @@ import assert from "assert";

});
it("Should generate buffer little-endian without trailing non-zero element", () => {
for (let i = 1; i < 33; i++) {
var buff = utilsN.leInt2Buff(BigInt(42), i);
for (let t = 1; t < buff.length; t++){
assert(buff[t] === 0, true);
}
}
});
it("Should generate buffer big-endian without trailing non-zero element", () => {
for (let i = 1; i < 33; i++) {
var buff = utilsN.beInt2Buff(BigInt(42), i);
for (let t = 0; t < buff.length - 1; t++){
assert(buff[t] === 0, true);
}
}
});
});

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