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

mcl-wasm

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcl-wasm - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "mcl-wasm",
"version": "0.0.6",
"version": "0.0.7",
"description": "mcl ; A generic and fast pairing-based cryptography library for Node.js by WebAssembly",

@@ -5,0 +5,0 @@ "main": "mcl.js",

@@ -10,2 +10,3 @@ const mcl = require('./mcl.js')

GTTest()
serializeTest()
IDbasedEncryptionTest()

@@ -229,2 +230,26 @@ PairingTest()

function serializeSubTest(Cstr, x, newDeserializeHexStr) {
const y = new Cstr()
y.deserialize(x.serialize())
assert(y.isEqual(x))
y.clear()
const s = x.serializeToHexStr()
y.deserializeHexStr(s)
assert(y.isEqual(x))
const z = newDeserializeHexStr(s)
assert(z.isEqual(x))
}
function serializeTest() {
const a = new mcl.Fr()
a.setStr('12345678')
serializeSubTest(mcl.Fr, a, mcl.deserializeHexStrToFr)
const P = mcl.hashAndMapToG1('abc')
serializeSubTest(mcl.G1, P, mcl.deserializeHexStrToG1)
const Q = mcl.hashAndMapToG2('abc')
serializeSubTest(mcl.G2, Q, mcl.deserializeHexStrToG2)
const e = mcl.pairing(P, Q)
serializeSubTest(mcl.GT, e, mcl.deserializeHexStrToGT)
}
function bench(label, count, func) {

@@ -231,0 +256,0 @@ const start = Date.now()

Sorry, the diff of this file is too big to display

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