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

snarkyjs-crypto

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snarkyjs-crypto - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

2

package.json
{
"name": "snarkyjs-crypto",
"version": "0.1.6",
"version": "0.1.7",
"scripts": {

@@ -5,0 +5,0 @@ "clean": "bsb -clean-world",

@@ -5,2 +5,4 @@ // Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE

var Curry = require("bs-platform/lib/js/curry.js");
var Caml_obj = require("bs-platform/lib/js/caml_obj.js");
var Caml_array = require("bs-platform/lib/js/caml_array.js");
var Pervasives = require("bs-platform/lib/js/pervasives.js");

@@ -12,4 +14,2 @@

var $eq = ((a, b) => a === b);
var $less = ((a, b) => a < b);

@@ -21,3 +21,3 @@

((BigInt(1)));
var one = (BigInt(1));

@@ -46,14 +46,33 @@ var add = ((a, b) => a + b);

function ofBits(bits) {
var n = bits.length;
var _acc = zero;
var _i = 0;
while(true) {
var i = _i;
var acc = _acc;
if (i === n) {
return acc;
} else {
var acc$1 = Caml_array.caml_array_get(bits, i) ? Curry._2(logOr, acc, Curry._2(shiftLeft, one, Curry._1(ofInt, i))) : acc;
_i = i + 1 | 0;
_acc = acc$1;
continue ;
}
};
}
var toString = ((s) => s.toString());
var one = Curry._1(ofInt, 1);
var one$1 = Curry._1(ofInt, 1);
function testBit(t, i) {
return Curry._2($eq, one, Curry._2(logAnd, one, Curry._2(shiftRight, t, Curry._1(ofInt, i))));
return Caml_obj.caml_equal(one$1, Curry._2(logAnd, one$1, Curry._2(shiftRight, t, Curry._1(ofInt, i))));
}
var $eq = ((a, b) => a === b);
var $$BigInt = {
$great: $great,
$great$eq: $great$eq,
$eq: $eq,
$less: $less,

@@ -71,2 +90,8 @@ $less$eq: $less$eq,

logOr: logOr,
ofString: ofString,
ofInt: ofInt,
ofBits: ofBits,
toString: toString,
one: one$1,
testBit: testBit,
$plus: add,

@@ -76,7 +101,3 @@ $neg: sub,

$slash: div,
ofString: ofString,
ofInt: ofInt,
toString: toString,
one: one,
testBit: testBit
$eq: $eq
};

@@ -140,5 +161,5 @@

};
var match = go(zero, one, size, a);
var match = go(zero, one$1, size, a);
var t = match[0];
if (Curry._2($great, match[1], one)) {
if (Curry._2($great, match[1], one$1)) {
return Pervasives.failwith("a is zero");

@@ -179,3 +200,2 @@ } else if (Curry._2($less, t, zero)) {

equal: $eq,
$eq: $eq,
div: div$1,

@@ -186,3 +206,3 @@ $plus: add$1,

$slash: div$1,
one: one,
one: one$1,
zero: zero,

@@ -192,5 +212,7 @@ negate: negate,

ofInt: ofInt,
ofBits: ofBits,
ofBigInt: ofBigInt,
square: square,
testBit: testBit
testBit: testBit,
$eq: $eq
};

@@ -243,5 +265,5 @@ }

};
var match = go(zero, one, size, a);
var match = go(zero, one$1, size, a);
var t = match[0];
if (Curry._2($great, match[1], one)) {
if (Curry._2($great, match[1], one$1)) {
return Pervasives.failwith("a is zero");

@@ -282,3 +304,2 @@ } else if (Curry._2($less, t, zero)) {

equal: $eq,
$eq: $eq,
div: div$1,

@@ -289,3 +310,3 @@ $plus: add$1,

$slash: div$1,
one: one,
one: one$1,
zero: zero,

@@ -295,5 +316,7 @@ negate: negate,

ofInt: ofInt,
ofBits: ofBits,
ofBigInt: ofBigInt,
square: square,
testBit: testBit,
$eq: $eq,
sizeInBits: 254

@@ -300,0 +323,0 @@ };

@@ -32,3 +32,2 @@ // Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE

var Scalar_equal = T.equal;
var Scalar_$eq = T.$eq;
var Scalar_div = T.div;

@@ -44,5 +43,7 @@ var Scalar_$plus = T.$plus;

var Scalar_ofInt = T.ofInt;
var Scalar_ofBits = T.ofBits;
var Scalar_ofBigInt = T.ofBigInt;
var Scalar_square = T.square;
var Scalar_testBit = T.testBit;
var Scalar_$eq = T.$eq;
var Scalar = {

@@ -63,3 +64,2 @@ T: T,

equal: Scalar_equal,
$eq: Scalar_$eq,
div: Scalar_div,

@@ -75,5 +75,7 @@ $plus: Scalar_$plus,

ofInt: Scalar_ofInt,
ofBits: Scalar_ofBits,
ofBigInt: Scalar_ofBigInt,
square: Scalar_square,
testBit: Scalar_testBit
testBit: Scalar_testBit,
$eq: Scalar_$eq
};

@@ -80,0 +82,0 @@ var a = Curry._1(Fq.ofString, "7296080957279758407415468581752425029516121466805344781232734728849116493472");

@@ -175,2 +175,3 @@ // Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE

ofInt: Field$1.ofInt,
ofBits: Field$1.ofBits,
toString: Field$1.toString,

@@ -232,2 +233,3 @@ testBit: Field$1.testBit

toString: M.Field.toString,
ofBits: M.Field.ofBits,
testBit: M.Field.testBit,

@@ -459,2 +461,3 @@ square: M.Field.square,

ofInt: Field$1.ofInt,
ofBits: Field$1.ofBits,
toString: Field$1.toString,

@@ -461,0 +464,0 @@ testBit: Field$1.testBit

Sorry, the diff of this file is not supported yet

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