ffjavascript
Advanced tools
Comparing version 0.2.24 to 0.2.25
{ | ||
"name": "ffjavascript", | ||
"type": "module", | ||
"version": "0.2.24", | ||
"version": "0.2.25", | ||
"description": "Finite Field Library in Javascript", | ||
@@ -6,0 +6,0 @@ "main": "./build/main.cjs", |
@@ -25,7 +25,2 @@ | ||
if (len <= PAGE_SIZE) { | ||
buff = new Uint8Array(len); | ||
} else { | ||
buff = new BigBuffer(len); | ||
} | ||
let p = firstPage; | ||
@@ -39,2 +34,10 @@ let o = fr % PAGE_SIZE; | ||
const srcView = new Uint8Array(this.buffers[p].buffer, this.buffers[p].byteOffset+o, l); | ||
if (l == len) return srcView; | ||
if (!buff) { | ||
if (len <= PAGE_SIZE) { | ||
buff = new Uint8Array(len); | ||
} else { | ||
buff = new BigBuffer(len); | ||
} | ||
} | ||
buff.set(srcView, len-r); | ||
@@ -41,0 +44,0 @@ r = r-l; |
@@ -230,2 +230,3 @@ | ||
fromRprLE(buff, offset) { | ||
offset = offset || 0; | ||
const res = buff.slice(offset, offset + this.n8); | ||
@@ -232,0 +233,0 @@ return this.toMontgomery(res); |
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
749050
14088